"foo", "FOO")));
}
@Test
public void testSimpleMissing() {
Template t = new Template("This is a test @[foo]\n@[bar]");
try {
t.eval(env(
"foo", "FOO"));
Assert.fail();
} catch (RuntimeException e) {
Assert.assertEquals("No replacement for bar at line 2", e.getMessage());
}
t = new Template("This is a test @[foo]\n\r\n@[bar]");
try {
t.eval(env(
"foo", "FOO"));
Assert.fail();
} catch (RuntimeException e) {
Assert.assertEquals("No replacement for bar at line 3", e.getMessage());
}