summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/regexp_parse/CharacterClass_ControlLetter.js
blob: d9109e911395f1b4d511831fcce02696438c475c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
if (typeof parseRegExp === 'undefined')
    quit();

load(libdir + "regexp_parse.js");

test("[\\ca]", all_flags,
     CharacterClass([
         ["\u0001", "\u0001"]
     ]));
test("[\\cz]", all_flags,
     CharacterClass([
         ["\u001a", "\u001a"]
     ]));
test("[\\cA]", all_flags,
     CharacterClass([
         ["\u0001", "\u0001"]
     ]));
test("[\\cZ]", all_flags,
     CharacterClass([
         ["\u001a", "\u001a"]
     ]));

// Invalid

test("[\\c]", no_unicode_flags,
     CharacterClass([
         ["\\", "\\"],
         ["c", "c"]
     ]));
test("[\\c=]", no_unicode_flags,
     CharacterClass([
         ["\\", "\\"],
         ["c", "c"],
         ["=", "="]
     ]));