Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Apr 15, 2024
1 parent f03e191 commit f7a9609
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/tests-regexp-2025.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ test("/(?<x>a)|(?<x>b)|(?<x>c)/", {}, { ecmaVersion: 2025 })
test("/(?<x>a)|\\k<x>/", {}, { ecmaVersion: 2025 })
testFail("/(?<x>a)|(?<x>b)(?<x>c)/", "Invalid regular expression: /(?<x>a)|(?<x>b)(?<x>c)/: Duplicate capture group name (1:1)", { ecmaVersion: 2025 })
testFail("/(?:(?<x>a)|(?<x>b))(?<x>c)/", "Invalid regular expression: /(?:(?<x>a)|(?<x>b))(?<x>c)/: Duplicate capture group name (1:1)", { ecmaVersion: 2025 })
testFail("/(?<x>a)(?:(?<x>b)|(?<x>c))/", "Invalid regular expression: /(?<x>a)(?:(?<x>b)|(?<x>c))/: Duplicate capture group name (1:1)", { ecmaVersion: 2025 })
testFail("/(?:(?:(?<x>a)|(?<x>b))|(?:))(?<x>c)/", "Invalid regular expression: /(?:(?:(?<x>a)|(?<x>b))|(?:))(?<x>c)/: Duplicate capture group name (1:1)", { ecmaVersion: 2025 })

0 comments on commit f7a9609

Please sign in to comment.