Skip to content

Commit 5cf5e7a

Browse files
Testing special chars in xml output
1 parent 0407d05 commit 5cf5e7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java

+6
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ private String createExpectedXML(boolean escape) {
8282
buf.append(LS);
8383
buf.append(" </el6>");
8484
buf.append(LS);
85+
buf.append(" <el8>special-char-" + (char) 7 + "</el8>");
86+
buf.append(LS);
8587
buf.append("</root>");
8688

8789
return buf.toString();
@@ -119,6 +121,10 @@ private Xpp3Dom createXpp3Dom() {
119121
el7.setValue("element7\n&\"\'<>");
120122
el6.addChild(el7);
121123

124+
Xpp3Dom el8 = new Xpp3Dom("el8");
125+
el8.setValue("special-char-" + (char) 7);
126+
127+
dom.addChild(el8);
122128
return dom;
123129
}
124130
}

0 commit comments

Comments
 (0)