We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ef0708 commit 6dfc129Copy full SHA for 6dfc129
src/test/scala/scala/xml/XMLTest.scala
@@ -824,4 +824,16 @@ expected closing tag of foo
824
}
825
826
827
+ @UnitTest
828
+ def issue28: Unit = {
829
+ val x = <x:foo xmlns:x="gaga"/>
830
+ // val ns = new NamespaceBinding("x", "gaga", sc)
831
+ // val x = Elem("x", "foo", e, ns)
832
+ val pp = new xml.PrettyPrinter(80, 2)
833
+ // This assertion passed
834
+ assertEquals("""<x:foo xmlns:x="gaga"/>""", x.toString)
835
+ // This was the bug, producing an errant xmlns attribute
836
+ assertEquals("""<x:foo xmlns:x="gaga"/>""", pp.format(x))
837
+ }
838
+
839
0 commit comments