Codebase list ohcount / fc0f4e2e-584f-4c68-9809-ad96640f54f0/main test / unit / parsers / test_jsp.h
fc0f4e2e-584f-4c68-9809-ad96640f54f0/main

Tree @fc0f4e2e-584f-4c68-9809-ad96640f54f0/main (Download .tar.gz)

test_jsp.h @fc0f4e2e-584f-4c68-9809-ad96640f54f0/mainraw · history · blame

void test_jsp_comment() {
  test_parser_verify_parse2(
    test_parser_sourcefile("jsp", " <% //comment\n%>"),
    "java", "", "<% //comment\n", 0,
    "html", "%>", "", 0
  );
}

void test_jsp_comment_entities() {
  test_parser_verify_entity(
    test_parser_sourcefile("jsp", " <!--comment-->"),
    "comment", "<!--comment-->"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("jsp", "<style type='text/css'>\n/*comment*/\n</style>"),
    "comment", "/*comment*/"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("jsp", "<%\n//comment\n%>"),
    "comment", "//comment"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("jsp", "<%\n/*comment*/\n%>"),
    "comment", "/*comment*/"
  );
}

void all_jsp_tests() {
  test_jsp_comment_entities();
}