File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -838,6 +838,20 @@ expected closing tag of foo
838838 assertEquals(""" <x:foo xmlns:x="gaga"/>""" , pp.format(x))
839839 }
840840
841+ @ UnitTest
842+ def issue76 : Unit = {
843+ val pp = new PrettyPrinter (9999 ,2 )
844+ val x = <foo >{" hi\n there" }</foo >
845+ assertEquals(" <foo>hi\n there</foo>" , x.toString)
846+ assertEquals(" <foo>hi there</foo>" , pp.format(x))
847+ val y = PCData (" hi\n there" )
848+ assertEquals(" <![CDATA[hi\n there]]>" , y.toString)
849+ assertEquals(" <![CDATA[hi\n there]]>" , pp.format(y))
850+ val z = <foo >{PCData (" hi\n there" )}</foo >
851+ assertEquals(" <foo><![CDATA[hi\n there]]></foo>" , z.toString)
852+ assertEquals(" <foo><![CDATA[hi\n there]]></foo>" , pp.format(z))
853+ }
854+
841855 @ UnitTest
842856 def nodeSeqNs : Unit = {
843857 val x = {
You can’t perform that action at this time.
0 commit comments