|
|
@ -34,8 +34,27 @@ public class Xomw_prepro_wkr__tst {
|
|
|
|
@Test public void Comment() {
|
|
|
|
@Test public void Comment() {
|
|
|
|
fxt.Test__parse("a<!--b-->c", "<root>a<comment><!--b--></comment>c</root>");
|
|
|
|
fxt.Test__parse("a<!--b-->c", "<root>a<comment><!--b--></comment>c</root>");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@Test public void Comment__nl__ws() {
|
|
|
|
@Test public void Comment__dangling() {
|
|
|
|
fxt.Test__parse("xo\n <!--1--> \n <!--2--> \nz", "<root>xo\n<comment> <!--1--> \n</comment><comment> <!--2--> \n</comment>z</root>");
|
|
|
|
fxt.Test__parse("a<!--b", "<root>a<comment><!--b</comment></root>");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test public void Comment__ws() { // NOTE: space is outside comment
|
|
|
|
|
|
|
|
fxt.Test__parse("a <!--b--> c", "<root>a <comment><!--b--></comment> c</root>");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test public void Comment__many__ws() { // NOTE: space is outside comment
|
|
|
|
|
|
|
|
fxt.Test__parse("a <!--1--> <!--2--> z", "<root>a <comment><!--1--></comment> <comment><!--2--></comment> z</root>");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test public void Comment__nl__ws() { // NOTE: space is inside comment if flanked by nl
|
|
|
|
|
|
|
|
fxt.Test__parse(String_.Concat_lines_nl_skip_last
|
|
|
|
|
|
|
|
( "a"
|
|
|
|
|
|
|
|
, " <!--1--> "
|
|
|
|
|
|
|
|
, " <!--2--> "
|
|
|
|
|
|
|
|
, "z"
|
|
|
|
|
|
|
|
), String_.Concat_lines_nl_skip_last
|
|
|
|
|
|
|
|
( "<root>a"
|
|
|
|
|
|
|
|
, "<comment> <!--1--> "
|
|
|
|
|
|
|
|
, "</comment><comment> <!--2--> "
|
|
|
|
|
|
|
|
, "</comment>z</root>"
|
|
|
|
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@Test public void Ext__pre() {
|
|
|
|
@Test public void Ext__pre() {
|
|
|
|
fxt.Test__parse("a<pre id=\"1\">b</pre>c", "<root>a<ext><name>pre</name><attr> id="1"</attr><inner>b</inner><close></pre></close></ext>c</root>");
|
|
|
|
fxt.Test__parse("a<pre id=\"1\">b</pre>c", "<root>a<ext><name>pre</name><attr> id="1"</attr><inner>b</inner><close></pre></close></ext>c</root>");
|
|
|
|