From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- .../RegExp/named-groups/duplicate-named-groups.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 js/src/tests/test262/staging/built-ins/RegExp/named-groups/duplicate-named-groups.js (limited to 'js/src/tests/test262/staging/built-ins/RegExp/named-groups/duplicate-named-groups.js') diff --git a/js/src/tests/test262/staging/built-ins/RegExp/named-groups/duplicate-named-groups.js b/js/src/tests/test262/staging/built-ins/RegExp/named-groups/duplicate-named-groups.js new file mode 100644 index 0000000000..d28346f13b --- /dev/null +++ b/js/src/tests/test262/staging/built-ins/RegExp/named-groups/duplicate-named-groups.js @@ -0,0 +1,19 @@ +// |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 different functions with duplicate names in alteration. +features: [regexp-duplicate-named-groups] +includes: [compareArray.js] +---*/ + +assert.compareArray( + ['xxyy', undefined, 'y'], /(?:(?:(?x)|(?y))\k){2}/.exec('xxyy')); +assert.compareArray( + ['zzyyxx', 'x', undefined, undefined, undefined, undefined], + /(?:(?:(?x)|(?y)|(a)|(?b)|(?z))\k){3}/.exec('xzzyyxxy')); +assert.compareArray( + ['xxyy', undefined, 'y'], 'xxyy'.match(/(?:(?:(?x)|(?y))\k){2}/)); + +reportCompare(0, 0); -- cgit v1.2.3