Skip to content

Commit

Permalink
Testing special chars in xml output
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed May 17, 2024
1 parent 0407d05 commit 520577e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ private String createExpectedXML(boolean escape) {
buf.append(LS);
buf.append(" </el6>");
buf.append(LS);
buf.append(" <el8>special-char-" + (char) 7 + "</el8>");
buf.append(LS);
buf.append("</root>");

return buf.toString();
Expand Down Expand Up @@ -116,9 +118,13 @@ private Xpp3Dom createXpp3Dom() {
dom.addChild(el6);

Xpp3Dom el7 = new Xpp3Dom("el7");
el7.setValue("element7\n&\"\'<>");
el7.setValue("element7\n&\"'<>");
el6.addChild(el7);

Xpp3Dom el8 = new Xpp3Dom("el8");
el8.setValue("special-char-" + (char) 7);

dom.addChild(el8);
return dom;
}
}

0 comments on commit 520577e

Please sign in to comment.