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 3b9b461 commit 77e12d2Copy full SHA for 77e12d2
jvm/src/test/scala/scala/xml/XMLTest.scala
@@ -542,4 +542,17 @@ class XMLTestJVM {
542
pp.format(x, sb)
543
assertEquals(expected, sb.toString)
544
}
545
+
546
+ @UnitTest
547
+ def issue46: Unit = {
548
+ // val x = <node/>
549
+ val x = <node></node>
550
+ // val x = Elem(null, "node", e, sc)
551
+ val pp = new xml.PrettyPrinter(80, 2)
552
+ // This assertion passed
553
+ assertEquals("<node></node>", x.toString)
554
+ // This was the bug, producing <node></node>
555
+ assertEquals("<node/>", pp.format(x.copy(minimizeEmpty = true)))
556
+ }
557
558
0 commit comments