Skip to content

Commit 4cf9021

Browse files
committed
Add corner case tests for ECMA 262 regexes
Add a very bizarre construct which only ECMA 262 allows in regexes. Check that lookbehinds are _not_ supported.
1 parent d964fa4 commit 4cf9021

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/draft3/optional/jsregex.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"description": "ECMA 262 regex dialect recognition",
4+
"schema": { "format": "pattern" },
5+
"tests": [
6+
{
7+
"description": "[^] is a valid regex",
8+
"data": "[^]",
9+
"valid": true
10+
},
11+
{
12+
"description": "ECMA 262 has no support for lookbehind",
13+
"data": "(?<=foo)bar",
14+
"valid": false
15+
}
16+
]
17+
}
18+
]

0 commit comments

Comments
 (0)