We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3161a38 commit bce3b4bCopy full SHA for bce3b4b
src/test/scala/scala/xml/XMLTest.scala
@@ -838,6 +838,20 @@ expected closing tag of foo
838
assertEquals("""<x:foo xmlns:x="gaga"/>""", pp.format(x))
839
}
840
841
+ @UnitTest
842
+ def issue76: Unit = {
843
+ val pp = new PrettyPrinter(9999,2)
844
+ val x = <foo>{"hi\nthere"}</foo>
845
+ assertEquals("<foo>hi\nthere</foo>", x.toString)
846
+ assertEquals("<foo>hi there</foo>", pp.format(x))
847
+ val y = PCData("hi\nthere")
848
+ assertEquals("<![CDATA[hi\nthere]]>", y.toString)
849
+ assertEquals("<![CDATA[hi\nthere]]>", pp.format(y))
850
+ val z = <foo>{PCData("hi\nthere")}</foo>
851
+ assertEquals("<foo><![CDATA[hi\nthere]]></foo>", z.toString)
852
+ assertEquals("<foo><![CDATA[hi\nthere]]></foo>", pp.format(z))
853
+ }
854
+
855
@UnitTest
856
def nodeSeqNs: Unit = {
857
val x = {
0 commit comments