File tree 1 file changed +48
-0
lines changed
jvm/src/test/scala/scala/xml
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -532,6 +532,54 @@ class XMLTestJVM {
532
532
}
533
533
}
534
534
535
+ /** Default SAXParserFactory */
536
+ val defaultParserFactory = javax.xml.parsers.SAXParserFactory .newInstance
537
+
538
+ @ throws(classOf [org.xml.sax.SAXNotRecognizedException ])
539
+ def issue17UnrecognizedFeature : Unit = {
540
+ assertTrue(defaultParserFactory.getFeature(" foobar" ))
541
+ }
542
+
543
+ @ UnitTest
544
+ def issue17SecureProcessing : Unit = {
545
+ assertTrue(defaultParserFactory.getFeature(" http://javax.xml.XMLConstants/feature/secure-processing" ))
546
+ }
547
+
548
+ @ UnitTest
549
+ def issue17ExternalGeneralEntities : Unit = {
550
+ assertTrue(defaultParserFactory.getFeature(" http://xml.org/sax/features/external-general-entities" ))
551
+ }
552
+
553
+ @ UnitTest
554
+ def issue17LoadExternalDtd : Unit = {
555
+ assertTrue(defaultParserFactory.getFeature(" http://apache.org/xml/features/nonvalidating/load-external-dtd" ))
556
+ }
557
+
558
+ @ UnitTest
559
+ def issue17DisallowDoctypeDecl : Unit = {
560
+ assertFalse(defaultParserFactory.getFeature(" http://apache.org/xml/features/disallow-doctype-decl" ))
561
+ }
562
+
563
+ @ UnitTest
564
+ def issue17ExternalParameterEntities : Unit = {
565
+ assertTrue(defaultParserFactory.getFeature(" http://xml.org/sax/features/external-parameter-entities" ))
566
+ }
567
+
568
+ @ UnitTest
569
+ def issue17ResolveDtdUris : Unit = {
570
+ assertTrue(defaultParserFactory.getFeature(" http://xml.org/sax/features/resolve-dtd-uris" ))
571
+ }
572
+
573
+ @ UnitTest
574
+ def issue17isXIncludeAware : Unit = {
575
+ assertFalse(XML .parser.isXIncludeAware)
576
+ }
577
+
578
+ @ UnitTest
579
+ def issue17isNamespaceAware : Unit = {
580
+ assertFalse(XML .parser.isNamespaceAware)
581
+ }
582
+
535
583
@ UnitTest
536
584
def issue28 : Unit = {
537
585
val x = <x : foo xmlns : x =" gaga" />
You can’t perform that action at this time.
0 commit comments