Codebase list ohcount / 4fa67836-5fea-4473-87e4-bd80a2d5b1ae/main test / unit / parsers / test_awk.h
4fa67836-5fea-4473-87e4-bd80a2d5b1ae/main

Tree @4fa67836-5fea-4473-87e4-bd80a2d5b1ae/main (Download .tar.gz)

test_awk.h @4fa67836-5fea-4473-87e4-bd80a2d5b1ae/mainraw · history · blame

void test_awk_comments() {
  test_parser_verify_parse(
    test_parser_sourcefile("awk", " #comment"),
    "awk", "", "#comment", 0
  );
}

void test_awk_double_slash() {
  test_parser_verify_parse(
    test_parser_sourcefile("awk", "\"\\\\\"\n#comment"),
    "awk", "\"\\\\\"\n", "#comment", 0
  );
  // awk doesn't recognize backslash escaping of double quote...weird
}

void test_awk_comment_entities() {
  test_parser_verify_entity(
    test_parser_sourcefile("awk", " #comment"),
    "comment", "#comment"
  );
}

void all_awk_tests() {
  test_awk_comments();
  test_awk_double_slash();
  test_awk_comment_entities();
}