Assert.assertEquals(expecting, st.render());
}
@Test public void testLineBreakMissingTrailingNewline() throws Exception {
writeFile(tmpdir, "t.stg", "a(x) ::= <<<\\\\>\r\n>>"); // that is <<<\\>>> not an escaped >>
ErrorBuffer errors = new ErrorBuffer();
STGroup group = new STGroupFile(tmpdir+"/"+"t.stg");
group.setListener(errors);
ST st = group.getInstanceOf("a");
assertEquals("t.stg 1:15: Missing newline after newline escape <\\\\>" + newline, errors.toString());
st.add("x", "parrt");
String expected = "";
String result = st.render();
assertEquals(expected, result);
}