forked from mysticatea/regexpp
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: updates test cases extracted from test262 (#202)
Co-authored-by: ota-meshi <16508807+ota-meshi@users.noreply.github.com>
- Loading branch information
1 parent
4d4787a
commit 5dcba6b
Showing
3 changed files
with
403 additions
and
0 deletions.
There are no files selected for viewing
170 changes: 170 additions & 0 deletions
170
test/fixtures/parser/literal/test262/Symbol.match-and-regexp-v-flag.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
{ | ||
"_test262FileNames": [ | ||
"test/built-ins/String/prototype/match/regexp-prototype-match-v-flag.js" | ||
], | ||
"options": {}, | ||
"patterns": { | ||
"/./gv": { | ||
"ast": { | ||
"type": "RegExpLiteral", | ||
"parent": null, | ||
"start": 0, | ||
"end": 5, | ||
"raw": "/./gv", | ||
"pattern": { | ||
"type": "Pattern", | ||
"parent": "♻️..", | ||
"start": 1, | ||
"end": 2, | ||
"raw": ".", | ||
"alternatives": [ | ||
{ | ||
"type": "Alternative", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 2, | ||
"raw": ".", | ||
"elements": [ | ||
{ | ||
"type": "CharacterSet", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 2, | ||
"raw": ".", | ||
"kind": "any" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"flags": { | ||
"type": "Flags", | ||
"parent": "♻️..", | ||
"start": 3, | ||
"end": 5, | ||
"raw": "gv", | ||
"global": true, | ||
"ignoreCase": false, | ||
"multiline": false, | ||
"unicode": false, | ||
"sticky": false, | ||
"dotAll": false, | ||
"hasIndices": false, | ||
"unicodeSets": true | ||
} | ||
} | ||
}, | ||
"/\\p{Script=Han}/gv": { | ||
"ast": { | ||
"type": "RegExpLiteral", | ||
"parent": null, | ||
"start": 0, | ||
"end": 18, | ||
"raw": "/\\p{Script=Han}/gv", | ||
"pattern": { | ||
"type": "Pattern", | ||
"parent": "♻️..", | ||
"start": 1, | ||
"end": 15, | ||
"raw": "\\p{Script=Han}", | ||
"alternatives": [ | ||
{ | ||
"type": "Alternative", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 15, | ||
"raw": "\\p{Script=Han}", | ||
"elements": [ | ||
{ | ||
"type": "CharacterSet", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 15, | ||
"raw": "\\p{Script=Han}", | ||
"kind": "property", | ||
"strings": false, | ||
"key": "Script", | ||
"value": "Han", | ||
"negate": false | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"flags": { | ||
"type": "Flags", | ||
"parent": "♻️..", | ||
"start": 16, | ||
"end": 18, | ||
"raw": "gv", | ||
"global": true, | ||
"ignoreCase": false, | ||
"multiline": false, | ||
"unicode": false, | ||
"sticky": false, | ||
"dotAll": false, | ||
"hasIndices": false, | ||
"unicodeSets": true | ||
} | ||
} | ||
}, | ||
"/𠮷/g": { | ||
"ast": { | ||
"type": "RegExpLiteral", | ||
"parent": null, | ||
"start": 0, | ||
"end": 5, | ||
"raw": "/𠮷/g", | ||
"pattern": { | ||
"type": "Pattern", | ||
"parent": "♻️..", | ||
"start": 1, | ||
"end": 3, | ||
"raw": "𠮷", | ||
"alternatives": [ | ||
{ | ||
"type": "Alternative", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 3, | ||
"raw": "𠮷", | ||
"elements": [ | ||
{ | ||
"type": "Character", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 2, | ||
"raw": "\ud842", | ||
"value": 55362 | ||
}, | ||
{ | ||
"type": "Character", | ||
"parent": "♻️../..", | ||
"start": 2, | ||
"end": 3, | ||
"raw": "\udfb7", | ||
"value": 57271 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"flags": { | ||
"type": "Flags", | ||
"parent": "♻️..", | ||
"start": 4, | ||
"end": 5, | ||
"raw": "g", | ||
"global": true, | ||
"ignoreCase": false, | ||
"multiline": false, | ||
"unicode": false, | ||
"sticky": false, | ||
"dotAll": false, | ||
"hasIndices": false, | ||
"unicodeSets": false | ||
} | ||
} | ||
} | ||
} | ||
} |
117 changes: 117 additions & 0 deletions
117
test/fixtures/parser/literal/test262/Symbol.matchAll-and-regexp-v-flag.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"_test262FileNames": [ | ||
"test/built-ins/String/prototype/matchAll/regexp-prototype-matchAll-v-flag.js" | ||
], | ||
"options": {}, | ||
"patterns": { | ||
"/(?:)/gv": { | ||
"ast": { | ||
"type": "RegExpLiteral", | ||
"parent": null, | ||
"start": 0, | ||
"end": 8, | ||
"raw": "/(?:)/gv", | ||
"pattern": { | ||
"type": "Pattern", | ||
"parent": "♻️..", | ||
"start": 1, | ||
"end": 5, | ||
"raw": "(?:)", | ||
"alternatives": [ | ||
{ | ||
"type": "Alternative", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 5, | ||
"raw": "(?:)", | ||
"elements": [ | ||
{ | ||
"type": "Group", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 5, | ||
"raw": "(?:)", | ||
"alternatives": [ | ||
{ | ||
"type": "Alternative", | ||
"parent": "♻️../..", | ||
"start": 4, | ||
"end": 4, | ||
"raw": "", | ||
"elements": [] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"flags": { | ||
"type": "Flags", | ||
"parent": "♻️..", | ||
"start": 6, | ||
"end": 8, | ||
"raw": "gv", | ||
"global": true, | ||
"ignoreCase": false, | ||
"multiline": false, | ||
"unicode": false, | ||
"sticky": false, | ||
"dotAll": false, | ||
"hasIndices": false, | ||
"unicodeSets": true | ||
} | ||
} | ||
}, | ||
"/𠮷/gv": { | ||
"ast": { | ||
"type": "RegExpLiteral", | ||
"parent": null, | ||
"start": 0, | ||
"end": 6, | ||
"raw": "/𠮷/gv", | ||
"pattern": { | ||
"type": "Pattern", | ||
"parent": "♻️..", | ||
"start": 1, | ||
"end": 3, | ||
"raw": "𠮷", | ||
"alternatives": [ | ||
{ | ||
"type": "Alternative", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 3, | ||
"raw": "𠮷", | ||
"elements": [ | ||
{ | ||
"type": "Character", | ||
"parent": "♻️../..", | ||
"start": 1, | ||
"end": 3, | ||
"raw": "𠮷", | ||
"value": 134071 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"flags": { | ||
"type": "Flags", | ||
"parent": "♻️..", | ||
"start": 4, | ||
"end": 6, | ||
"raw": "gv", | ||
"global": true, | ||
"ignoreCase": false, | ||
"multiline": false, | ||
"unicode": false, | ||
"sticky": false, | ||
"dotAll": false, | ||
"hasIndices": false, | ||
"unicodeSets": true | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.