diff --git a/tests/languages/ocaml/boolean_feature.test b/tests/languages/ocaml/boolean_feature.test new file mode 100644 index 0000000000..cffed63881 --- /dev/null +++ b/tests/languages/ocaml/boolean_feature.test @@ -0,0 +1,13 @@ +false +true + +---------------------------------------------------- + +[ + ["boolean", "false"], + ["boolean", "true"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/tests/languages/ocaml/comment_feature.test b/tests/languages/ocaml/comment_feature.test new file mode 100644 index 0000000000..25623ef2ef --- /dev/null +++ b/tests/languages/ocaml/comment_feature.test @@ -0,0 +1,14 @@ +(**) +(* foo +bar *) + +---------------------------------------------------- + +[ + ["comment", "(**)"], + ["comment", "(* foo\r\nbar *)"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/ocaml/directive_feature.test b/tests/languages/ocaml/directive_feature.test new file mode 100644 index 0000000000..704e25080c --- /dev/null +++ b/tests/languages/ocaml/directive_feature.test @@ -0,0 +1,15 @@ +#quit +#load +#load_rec + +---------------------------------------------------- + +[ + ["directive", "#quit"], + ["directive", "#load"], + ["directive", "#load_rec"] +] + +---------------------------------------------------- + +Checks for directives. \ No newline at end of file diff --git a/tests/languages/ocaml/keyword_feature.test b/tests/languages/ocaml/keyword_feature.test new file mode 100644 index 0000000000..2259da66b5 --- /dev/null +++ b/tests/languages/ocaml/keyword_feature.test @@ -0,0 +1,101 @@ +as +assert +begin +class +constraint +do +done +downto +else +end +exception +external +for +fun +function +functor +if +in +include +inherit +initializer +lazy +let +match +method +module +mutable +new +object +of +open +prefix +private +rec +then +sig +struct +to +try +type +val +value +virtual +where +while +with + +---------------------------------------------------- + +[ + ["keyword", "as"], + ["keyword", "assert"], + ["keyword", "begin"], + ["keyword", "class"], + ["keyword", "constraint"], + ["keyword", "do"], + ["keyword", "done"], + ["keyword", "downto"], + ["keyword", "else"], + ["keyword", "end"], + ["keyword", "exception"], + ["keyword", "external"], + ["keyword", "for"], + ["keyword", "fun"], + ["keyword", "function"], + ["keyword", "functor"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "include"], + ["keyword", "inherit"], + ["keyword", "initializer"], + ["keyword", "lazy"], + ["keyword", "let"], + ["keyword", "match"], + ["keyword", "method"], + ["keyword", "module"], + ["keyword", "mutable"], + ["keyword", "new"], + ["keyword", "object"], + ["keyword", "of"], + ["keyword", "open"], + ["keyword", "prefix"], + ["keyword", "private"], + ["keyword", "rec"], + ["keyword", "then"], + ["keyword", "sig"], + ["keyword", "struct"], + ["keyword", "to"], + ["keyword", "try"], + ["keyword", "type"], + ["keyword", "val"], + ["keyword", "value"], + ["keyword", "virtual"], + ["keyword", "where"], + ["keyword", "while"], + ["keyword", "with"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/tests/languages/ocaml/number_feature.test b/tests/languages/ocaml/number_feature.test new file mode 100644 index 0000000000..2076a5cbe4 --- /dev/null +++ b/tests/languages/ocaml/number_feature.test @@ -0,0 +1,25 @@ +0xBad_Face +0o754_672 +0b1010_1111 +42_000 +3.14_15_9 +3.2e8 +6.1E-7 +0.4e+12_415 + +---------------------------------------------------- + +[ + ["number", "0xBad_Face"], + ["number", "0o754_672"], + ["number", "0b1010_1111"], + ["number", "42_000"], + ["number", "3.14_15_9"], + ["number", "3.2e8"], + ["number", "6.1E-7"], + ["number", "0.4e+12_415"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/tests/languages/ocaml/operator_feature.test b/tests/languages/ocaml/operator_feature.test new file mode 100644 index 0000000000..75c8f01848 --- /dev/null +++ b/tests/languages/ocaml/operator_feature.test @@ -0,0 +1,31 @@ +and asr land +lor lxor lsl lsr +mod nor or + +:= += < > @ +^ | & ~ ++ - * / +$ % ! ? + +~=~ + +---------------------------------------------------- + +[ + ["operator", "and"], ["operator", "asr"], ["operator", "land"], + ["operator", "lor"], ["operator", "lxor"], ["operator", "lsl"], ["operator", "lsr"], + ["operator", "mod"], ["operator", "nor"], ["operator", "or"], + + ["operator", ":="], + ["operator", "="], ["operator", "<"], ["operator", ">"], ["operator", "@"], + ["operator", "^"], ["operator", "|"], ["operator", "&"], ["operator", "~"], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "$"], ["operator", "%"], ["operator", "!"], ["operator", "?"], + + ["operator", "~=~"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/ocaml/string_feature.test b/tests/languages/ocaml/string_feature.test new file mode 100644 index 0000000000..b7eabd4dda --- /dev/null +++ b/tests/languages/ocaml/string_feature.test @@ -0,0 +1,25 @@ +"" +"Fo\"obar" +'\'' +'\123' +'\xf4' +`\`` +`\123` +`\xf4` + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"Fo\\\"obar\""], + ["string", "'\\''"], + ["string", "'\\123'"], + ["string", "'\\xf4'"], + ["string", "`\\``"], + ["string", "`\\123`"], + ["string", "`\\xf4`"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/tests/languages/ocaml/type_feature.test b/tests/languages/ocaml/type_feature.test new file mode 100644 index 0000000000..f6fdd68648 --- /dev/null +++ b/tests/languages/ocaml/type_feature.test @@ -0,0 +1,17 @@ +'Foo +'bar_42 +`Foo +`bar_42 + +---------------------------------------------------- + +[ + ["type", "'Foo"], + ["type", "'bar_42"], + ["type", "`Foo"], + ["type", "`bar_42"] +] + +---------------------------------------------------- + +Checks for types. \ No newline at end of file