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 642b853 commit 014bdcaCopy full SHA for 014bdca
jvm/src/test/scala/scala/xml/XMLTest.scala
@@ -547,4 +547,17 @@ class XMLTestJVM {
547
pp.format(x, sb)
548
assertEquals(expected, sb.toString)
549
}
550
+
551
+ @UnitTest
552
+ def issue46: Unit = {
553
+ // val x = <node/>
554
+ val x = <node></node>
555
+ // val x = Elem(null, "node", e, sc)
556
+ val pp = new xml.PrettyPrinter(80, 2)
557
+ // This assertion passed
558
+ assertEquals("<node></node>", x.toString)
559
+ // This was the bug, producing <node></node>
560
+ assertEquals("<node/>", pp.format(x.copy(minimizeEmpty = true)))
561
+ }
562
563
0 commit comments