You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.5 KiB
37 lines
1.5 KiB
From 07f316957b59d305f04c7bdb26292852bcbc2eb5 Mon Sep 17 00:00:00 2001
|
|
From: Rolf Lear <rolf@tuis.net>
|
|
Date: Thu, 1 Jul 2021 23:56:47 -0400
|
|
Subject: [PATCH] Update test case to ensure DTD handling is OK again. Related
|
|
#188. Related #189
|
|
|
|
---
|
|
test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java b/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
|
index a69380ba..a35a1b90 100644
|
|
--- a/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
|
+++ b/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
|
@@ -101,6 +101,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
import org.jdom2.DefaultJDOMFactory;
|
|
import org.jdom2.Document;
|
|
import org.jdom2.EntityRef;
|
|
+import org.jdom2.JDOMConstants;
|
|
import org.jdom2.JDOMException;
|
|
import org.jdom2.JDOMFactory;
|
|
import org.jdom2.UncheckedJDOMFactory;
|
|
@@ -609,11 +610,12 @@ public void testSetExternalFeature() {
|
|
XMLReader reader = sb.createParser();
|
|
assertNotNull(reader);
|
|
assertTrue(reader.getFeature(feature));
|
|
+ assertNull(reader.getProperty(JDOMConstants.SAX_PROPERTY_DECLARATION_HANDLER));
|
|
sb.setFeature(feature, false);
|
|
reader = sb.createParser();
|
|
assertNotNull(reader);
|
|
assertFalse(reader.getFeature(feature));
|
|
-
|
|
+ assertNotNull(reader.getProperty(JDOMConstants.SAX_PROPERTY_DECLARATION_HANDLER));
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
fail("Could not create parser: " + e.getMessage());
|