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

assert.sameValue("xab".search(/(?<x>a)|(?<x>b)/), 1);
assert.sameValue("xba".search(/(?<x>a)|(?<x>b)/), 1);

reportCompare(0, 0);