summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/regexp_parse/Atom_IdentityEscape.js
blob: aeb84526a1bb26b87612ac26ec9677f7dde6bce8 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
if (typeof parseRegExp === 'undefined')
    quit();

load(libdir + "regexp_parse.js");

// SyntaxCharacter

test("\\^", all_flags,
     Atom("^"));
test("\\$", all_flags,
     Atom("$"));
test("\\\\", all_flags,
     Atom("\\"));
test("\\.", all_flags,
     Atom("."));
test("\\*", all_flags,
     Atom("*"));
test("\\+", all_flags,
     Atom("+"));
test("\\?", all_flags,
     Atom("?"));
test("\\(", all_flags,
     Atom("("));
test("\\)", all_flags,
     Atom(")"));
test("\\[", all_flags,
     Atom("["));
test("\\]", all_flags,
     Atom("]"));
test("\\{", all_flags,
     Atom("{"));
test("\\}", all_flags,
     Atom("}"));
test("\\|", all_flags,
     Atom("|"));

// Slash

test("\\/", all_flags,
     Atom("/"));

// SourceCharacter

test("\\P", no_unicode_flags,
     Atom("P"));

test("\\uX", no_unicode_flags,
     Atom("uX"));

test("\\u{0000}", no_unicode_flags,
     Quantifier(0, 0, "GREEDY", Atom("u")));

test("\\c_", no_unicode_flags,
     Atom("\\c_"));