mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
add non-matching example
This commit is contained in:
parent
52284ba4bb
commit
418419a345
@ -17,3 +17,6 @@ assert.compareArray(["bb", undefined, "bb"], "bb".match(/(?:(?<x>a)|(?<x>b))\k<x
|
||||
let matchResult = "aabb".match(/(?:(?:(?<x>a)|(?<x>b))\k<x>){2}/);
|
||||
assert.compareArray(["aabb", undefined, "bb"], matchResult);
|
||||
assert.sameValue(matchResult.groups.x, "bb");
|
||||
|
||||
let notMatched = "abab".match(/(?:(?:(?<x>a)|(?<x>b))\k<x>){2}/);
|
||||
assert.sameValue(null, notMatched);
|
||||
|
Loading…
x
Reference in New Issue
Block a user