blob: 27a2b22a820bae9e07129fdf618d2398f3d5c3dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// |reftest| skip -- regexp-duplicate-named-groups is not supported
// Copyright (C) 2024 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Test search function with duplicate names in alteration.
features: [regexp-duplicate-named-groups]
includes: [compareArray.js]
---*/
assert.compareArray(3, 'abcxyz'.search(/(?<a>x)|(?<a>y)/));
assert.compareArray(3, 'abcxyz'.search(/(?<a>y)|(?<a>x)/));
assert.compareArray(1, 'aybcxyz'.search(/(?<a>x)|(?<a>y)/));
assert.compareArray(1, 'aybcxyz'.search(/(?<a>y)|(?<a>x)/));
reportCompare(0, 0);
|