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 9cb7579 commit 5d32534Copy full SHA for 5d32534
jvm/src/test/scala/scala/xml/XMLTest.scala
@@ -874,4 +874,17 @@ expected closing tag of foo
874
pp.format(x, sb)
875
assertEquals(expected, sb.toString)
876
}
877
+
878
+ @UnitTest
879
+ def issue46: Unit = {
880
+ // val x = <node/>
881
+ val x = <node></node>
882
+ // val x = Elem(null, "node", e, sc)
883
+ val pp = new xml.PrettyPrinter(80, 2)
884
+ // This assertion passed
885
+ assertEquals("<node></node>", x.toString)
886
+ // This was the bug, producing <node></node>
887
+ assertEquals("<node/>", pp.format(x.copy(minimizeEmpty = true)))
888
+ }
889
890
0 commit comments