Skip to content

Commit 5dcba6b

Browse files
test: updates test cases extracted from test262 (#202)
Co-authored-by: ota-meshi <16508807+ota-meshi@users.noreply.github.com>
1 parent 4d4787a commit 5dcba6b

File tree

3 files changed

+403
-0
lines changed

3 files changed

+403
-0
lines changed
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
{
2+
"_test262FileNames": [
3+
"test/built-ins/String/prototype/match/regexp-prototype-match-v-flag.js"
4+
],
5+
"options": {},
6+
"patterns": {
7+
"/./gv": {
8+
"ast": {
9+
"type": "RegExpLiteral",
10+
"parent": null,
11+
"start": 0,
12+
"end": 5,
13+
"raw": "/./gv",
14+
"pattern": {
15+
"type": "Pattern",
16+
"parent": "♻️..",
17+
"start": 1,
18+
"end": 2,
19+
"raw": ".",
20+
"alternatives": [
21+
{
22+
"type": "Alternative",
23+
"parent": "♻️../..",
24+
"start": 1,
25+
"end": 2,
26+
"raw": ".",
27+
"elements": [
28+
{
29+
"type": "CharacterSet",
30+
"parent": "♻️../..",
31+
"start": 1,
32+
"end": 2,
33+
"raw": ".",
34+
"kind": "any"
35+
}
36+
]
37+
}
38+
]
39+
},
40+
"flags": {
41+
"type": "Flags",
42+
"parent": "♻️..",
43+
"start": 3,
44+
"end": 5,
45+
"raw": "gv",
46+
"global": true,
47+
"ignoreCase": false,
48+
"multiline": false,
49+
"unicode": false,
50+
"sticky": false,
51+
"dotAll": false,
52+
"hasIndices": false,
53+
"unicodeSets": true
54+
}
55+
}
56+
},
57+
"/\\p{Script=Han}/gv": {
58+
"ast": {
59+
"type": "RegExpLiteral",
60+
"parent": null,
61+
"start": 0,
62+
"end": 18,
63+
"raw": "/\\p{Script=Han}/gv",
64+
"pattern": {
65+
"type": "Pattern",
66+
"parent": "♻️..",
67+
"start": 1,
68+
"end": 15,
69+
"raw": "\\p{Script=Han}",
70+
"alternatives": [
71+
{
72+
"type": "Alternative",
73+
"parent": "♻️../..",
74+
"start": 1,
75+
"end": 15,
76+
"raw": "\\p{Script=Han}",
77+
"elements": [
78+
{
79+
"type": "CharacterSet",
80+
"parent": "♻️../..",
81+
"start": 1,
82+
"end": 15,
83+
"raw": "\\p{Script=Han}",
84+
"kind": "property",
85+
"strings": false,
86+
"key": "Script",
87+
"value": "Han",
88+
"negate": false
89+
}
90+
]
91+
}
92+
]
93+
},
94+
"flags": {
95+
"type": "Flags",
96+
"parent": "♻️..",
97+
"start": 16,
98+
"end": 18,
99+
"raw": "gv",
100+
"global": true,
101+
"ignoreCase": false,
102+
"multiline": false,
103+
"unicode": false,
104+
"sticky": false,
105+
"dotAll": false,
106+
"hasIndices": false,
107+
"unicodeSets": true
108+
}
109+
}
110+
},
111+
"/𠮷/g": {
112+
"ast": {
113+
"type": "RegExpLiteral",
114+
"parent": null,
115+
"start": 0,
116+
"end": 5,
117+
"raw": "/𠮷/g",
118+
"pattern": {
119+
"type": "Pattern",
120+
"parent": "♻️..",
121+
"start": 1,
122+
"end": 3,
123+
"raw": "𠮷",
124+
"alternatives": [
125+
{
126+
"type": "Alternative",
127+
"parent": "♻️../..",
128+
"start": 1,
129+
"end": 3,
130+
"raw": "𠮷",
131+
"elements": [
132+
{
133+
"type": "Character",
134+
"parent": "♻️../..",
135+
"start": 1,
136+
"end": 2,
137+
"raw": "\ud842",
138+
"value": 55362
139+
},
140+
{
141+
"type": "Character",
142+
"parent": "♻️../..",
143+
"start": 2,
144+
"end": 3,
145+
"raw": "\udfb7",
146+
"value": 57271
147+
}
148+
]
149+
}
150+
]
151+
},
152+
"flags": {
153+
"type": "Flags",
154+
"parent": "♻️..",
155+
"start": 4,
156+
"end": 5,
157+
"raw": "g",
158+
"global": true,
159+
"ignoreCase": false,
160+
"multiline": false,
161+
"unicode": false,
162+
"sticky": false,
163+
"dotAll": false,
164+
"hasIndices": false,
165+
"unicodeSets": false
166+
}
167+
}
168+
}
169+
}
170+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"_test262FileNames": [
3+
"test/built-ins/String/prototype/matchAll/regexp-prototype-matchAll-v-flag.js"
4+
],
5+
"options": {},
6+
"patterns": {
7+
"/(?:)/gv": {
8+
"ast": {
9+
"type": "RegExpLiteral",
10+
"parent": null,
11+
"start": 0,
12+
"end": 8,
13+
"raw": "/(?:)/gv",
14+
"pattern": {
15+
"type": "Pattern",
16+
"parent": "♻️..",
17+
"start": 1,
18+
"end": 5,
19+
"raw": "(?:)",
20+
"alternatives": [
21+
{
22+
"type": "Alternative",
23+
"parent": "♻️../..",
24+
"start": 1,
25+
"end": 5,
26+
"raw": "(?:)",
27+
"elements": [
28+
{
29+
"type": "Group",
30+
"parent": "♻️../..",
31+
"start": 1,
32+
"end": 5,
33+
"raw": "(?:)",
34+
"alternatives": [
35+
{
36+
"type": "Alternative",
37+
"parent": "♻️../..",
38+
"start": 4,
39+
"end": 4,
40+
"raw": "",
41+
"elements": []
42+
}
43+
]
44+
}
45+
]
46+
}
47+
]
48+
},
49+
"flags": {
50+
"type": "Flags",
51+
"parent": "♻️..",
52+
"start": 6,
53+
"end": 8,
54+
"raw": "gv",
55+
"global": true,
56+
"ignoreCase": false,
57+
"multiline": false,
58+
"unicode": false,
59+
"sticky": false,
60+
"dotAll": false,
61+
"hasIndices": false,
62+
"unicodeSets": true
63+
}
64+
}
65+
},
66+
"/𠮷/gv": {
67+
"ast": {
68+
"type": "RegExpLiteral",
69+
"parent": null,
70+
"start": 0,
71+
"end": 6,
72+
"raw": "/𠮷/gv",
73+
"pattern": {
74+
"type": "Pattern",
75+
"parent": "♻️..",
76+
"start": 1,
77+
"end": 3,
78+
"raw": "𠮷",
79+
"alternatives": [
80+
{
81+
"type": "Alternative",
82+
"parent": "♻️../..",
83+
"start": 1,
84+
"end": 3,
85+
"raw": "𠮷",
86+
"elements": [
87+
{
88+
"type": "Character",
89+
"parent": "♻️../..",
90+
"start": 1,
91+
"end": 3,
92+
"raw": "𠮷",
93+
"value": 134071
94+
}
95+
]
96+
}
97+
]
98+
},
99+
"flags": {
100+
"type": "Flags",
101+
"parent": "♻️..",
102+
"start": 4,
103+
"end": 6,
104+
"raw": "gv",
105+
"global": true,
106+
"ignoreCase": false,
107+
"multiline": false,
108+
"unicode": false,
109+
"sticky": false,
110+
"dotAll": false,
111+
"hasIndices": false,
112+
"unicodeSets": true
113+
}
114+
}
115+
}
116+
}
117+
}

0 commit comments

Comments
 (0)