diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/named-groups/duplicate-names-split.js')
-rw-r--r-- | js/src/tests/test262/built-ins/RegExp/named-groups/duplicate-names-split.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/named-groups/duplicate-names-split.js b/js/src/tests/test262/built-ins/RegExp/named-groups/duplicate-names-split.js new file mode 100644 index 0000000000..ccd9c77993 --- /dev/null +++ b/js/src/tests/test262/built-ins/RegExp/named-groups/duplicate-names-split.js @@ -0,0 +1,15 @@ +// |reftest| skip -- regexp-duplicate-named-groups is not supported +// Copyright 2022 Igalia S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: String.prototype.search behavior with duplicate named capture groups +esid: prod-GroupSpecifier +includes: [compareArray.js] +features: [regexp-duplicate-named-groups] +---*/ + +assert.compareArray("xab".split(/(?<x>a)|(?<x>b)/), ["x", "a", undefined, "", undefined, "b", ""]); +assert.compareArray("xba".split(/(?<x>a)|(?<x>b)/), ["x", undefined, "b", "", "a", undefined, ""]); + +reportCompare(0, 0); |