Skip to content

Commit 418419a

Browse files
bakkotptomato
authored andcommitted
add non-matching example
1 parent 52284ba commit 418419a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/built-ins/RegExp/named-groups/duplicate-names.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ assert.compareArray(["bb", undefined, "bb"], "bb".match(/(?:(?<x>a)|(?<x>b))\k<x
1717
let matchResult = "aabb".match(/(?:(?:(?<x>a)|(?<x>b))\k<x>){2}/);
1818
assert.compareArray(["aabb", undefined, "bb"], matchResult);
1919
assert.sameValue(matchResult.groups.x, "bb");
20+
21+
let notMatched = "abab".match(/(?:(?:(?<x>a)|(?<x>b))\k<x>){2}/);
22+
assert.sameValue(null, notMatched);

0 commit comments

Comments
 (0)