summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/RegExp/named-groups/duplicate-names-split.js
blob: ccd9c7799370d1a9802db24a76e433fdf9629e8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);