Skip to content

Commit 520577e

Browse files
Testing special chars in xml output
1 parent 0407d05 commit 520577e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

+7-1
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();
@@ -116,9 +118,13 @@ private Xpp3Dom createXpp3Dom() {
116118
dom.addChild(el6);
117119

118120
Xpp3Dom el7 = new Xpp3Dom("el7");
119-
el7.setValue("element7\n&\"\'<>");
121+
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)