From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- js/src/tests/non262/RegExp/regress-613820-3.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 js/src/tests/non262/RegExp/regress-613820-3.js (limited to 'js/src/tests/non262/RegExp/regress-613820-3.js') diff --git a/js/src/tests/non262/RegExp/regress-613820-3.js b/js/src/tests/non262/RegExp/regress-613820-3.js new file mode 100644 index 0000000000..126e838ff2 --- /dev/null +++ b/js/src/tests/non262/RegExp/regress-613820-3.js @@ -0,0 +1,9 @@ +/* Capture group reset to undefined during second iteration, so backreference doesn't see prior result. */ +var re = /(?:^(a)|\1(a)|(ab)){2}/; +var str = 'aab'; +var actual = re.exec(str); +var expected = makeExpectedMatch(['aa', undefined, 'a', undefined], 0, str); +checkRegExpMatch(actual, expected); + +if (typeof reportCompare === 'function') + reportCompare(true, true); -- cgit v1.2.3