assertEquals(0,dateTool.getMonth(disp));
assertEquals(2,dateTool.getDay(disp));
}
public @Test void testEscapeTool() {
EscapeTool escapeTool = (EscapeTool)toolbox.get("esc");
assertNotNull(escapeTool);
assertEquals("${esc.d}foo ${esc.h}bar()",escapeTool.velocity("$foo #bar()"));
/* propertyKey */
assertEquals("\\ C\\:\\\\Program\\ Files",escapeTool.propertyKey(" C:\\Program Files"));
/* propertyValue */
assertEquals("\\ C\\:\\\\Program Files",escapeTool.propertyValue(" C:\\Program Files"));
/* java */
assertEquals("\\uFFFF\\b\\n\\t\\f\\r\\\"\\\\",escapeTool.java("\uFFFF\b\n\t\f\r\"\\"));
/* javascript */
assertEquals("\\uFFFF\\b\\n\\t\\f\\r\\\"\\'\\\\",escapeTool.javascript("\uFFFF\b\n\t\f\r\"'\\"));
/* html */
assertEquals(""&<> ",escapeTool.html("\"&<>"+(char)160));
/* url */
assertEquals("%40%2F%3F%3D+%26",escapeTool.url("@/?= &"));
/* sql */
assertEquals("''",escapeTool.sql("'"));
/* xml */
assertEquals(""&<>",escapeTool.html("\"&<>"));
/* unicode */
assertEquals("\uf00b", escapeTool.unicode("f00b"));
assertEquals("\u1010", escapeTool.unicode("\\u1010"));
assertEquals("\u1111", escapeTool.unicode(1111));
}