Merge pull request #41 from blackducksw/ubuntu_14
[ohcount] / test / unit / parsers / test_rebol.h
1
2 void test_rebol_comments() {
3   test_parser_verify_parse(
4     test_parser_sourcefile("rebol", "REBOL []\n;comment"),
5     "rebol", "REBOL []\n", ";comment", 0
6   );
7   test_parser_verify_parse(
8     test_parser_sourcefile("rebol", "{}"),
9     "rebol", "{}", "", 0
10   );
11   test_parser_verify_parse(
12     test_parser_sourcefile("rebol", "{{}}"),
13     "rebol", "{{}}", "", 0
14   );
15   test_parser_verify_parse(
16     test_parser_sourcefile("rebol", "{{\n}}"),
17     "rebol", "{{\n}}", "", 0
18   );
19   test_parser_verify_parse(
20     test_parser_sourcefile("rebol", "{\n;inside string\n}"),
21     "rebol", "{\n;inside string\n}", "", 0
22   );
23   test_parser_verify_parse(
24     test_parser_sourcefile("rebol", "{}\n;comment"),
25     "rebol", "{}\n", ";comment", 0
26   );
27 }
28
29 void test_rebol_comment_entities() {
30   test_parser_verify_entity(
31     test_parser_sourcefile("rebol", " ;comment"),
32     "comment", ";comment"
33   );
34   test_parser_verify_entity(
35     test_parser_sourcefile("rebol", " \";no comment\""),
36     "string", "\";no comment\""
37   );
38 }
39
40 void all_rebol_tests() {
41   test_rebol_comments();
42   test_rebol_comment_entities();
43 }