diff options
Diffstat (limited to 'js/src/jit-test/tests/regexp_parse/Disjunction.js')
-rw-r--r-- | js/src/jit-test/tests/regexp_parse/Disjunction.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/regexp_parse/Disjunction.js b/js/src/jit-test/tests/regexp_parse/Disjunction.js new file mode 100644 index 000000000..55d5d2b7e --- /dev/null +++ b/js/src/jit-test/tests/regexp_parse/Disjunction.js @@ -0,0 +1,42 @@ +if (typeof parseRegExp === 'undefined') + quit(); + +load(libdir + "regexp_parse.js"); + +test("a|\u3042", all_flags, + Disjunction([ + Atom("a"), + Atom("\u3042") + ])); + +test("a|\u3042|abc", all_flags, + Disjunction([ + Atom("a"), + Atom("\u3042"), + Atom("abc") + ])); + +test("|", all_flags, + Disjunction([ + Empty(), + Empty() + ])); + +test("||", all_flags, + Disjunction([ + Empty(), + Empty(), + Empty() + ])); + +test("abc|", all_flags, + Disjunction([ + Atom("abc"), + Empty() + ])); + +test("|abc", all_flags, + Disjunction([ + Empty(), + Atom("abc") + ])); |