@@ -36,19 +36,42 @@ void test5_2(DOMImplementationLS *impl, InputSource &data) {
36
36
p->parse (data); // GOOD
37
37
}
38
38
39
+ void test5_3 (DOMImplementationLS *impl, InputSource &data) {
40
+ DOMLSParser *p = impl->createLSParser ();
41
+
42
+ p->getDomConfig ()->setParameter (XMLUni::fgXercesDisableDefaultEntityResolution, false );
43
+ p->parse (data); // BAD (parser not correctly configured) [NOT DETECTED]
44
+ }
45
+
46
+ void test5_4 (DOMImplementationLS *impl, InputSource &data) {
47
+ DOMLSParser *p = impl->createLSParser ();
48
+ DOMConfiguration *cfg = p->getDomConfig ();
49
+
50
+ cfg->setParameter (XMLUni::fgXercesDisableDefaultEntityResolution, true );
51
+ p->parse (data); // GOOD
52
+ }
53
+
54
+ void test5_5 (DOMImplementationLS *impl, InputSource &data) {
55
+ DOMLSParser *p = impl->createLSParser ();
56
+ DOMConfiguration *cfg = p->getDomConfig ();
57
+
58
+ cfg->setParameter (XMLUni::fgXercesDisableDefaultEntityResolution, false );
59
+ p->parse (data); // BAD (parser not correctly configured) [NOT DETECTED]
60
+ }
61
+
39
62
DOMImplementationLS *g_impl;
40
63
DOMLSParser *g_p1, *g_p2;
41
64
InputSource *g_data;
42
65
43
- void test5_3_init () {
66
+ void test5_6_init () {
44
67
g_p1 = g_impl->createLSParser ();
45
68
g_p1->getDomConfig ()->setParameter (XMLUni::fgXercesDisableDefaultEntityResolution, true );
46
69
47
70
g_p2 = g_impl->createLSParser ();
48
71
}
49
72
50
- void test5_3 () {
51
- test5_3_init ();
73
+ void test5_6 () {
74
+ test5_6_init ();
52
75
53
76
g_p1->parse (*g_data); // GOOD
54
77
g_p2->parse (*g_data); // BAD (parser not correctly configured) [NOT DETECTED]
0 commit comments