tst.addContent(cmt);
String spaced = " <child>\n <!--comment-->\n </child>\n";
String compact = "<child><!--comment--></child>";
String preserved = "<child xml:space=\"preserve\"><!--comment--></child>";
Element root = new Element("root");
root.addContent(tst.clone());
root.addContent(tst.clone().setAttribute("space", "preserve", Namespace.XML_NAMESPACE));
root.addContent(tst.clone());
String rawcompact = "<root>" + compact + preserved + compact + "</root>";
String pretty = "<root>\n" + spaced + " " + preserved + "\n" + spaced + "</root>";
checkOutput(root, rawcompact, rawcompact, pretty, pretty, pretty);