From c44d82c3703902c3b88f455db5fb06bd12ec5957 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Mon, 24 Oct 2022 09:50:42 +0200 Subject: [PATCH] Add `/iu` Unicode case folding tests Ref. https://bugs.chromium.org/p/v8/issues/detail?id=13377 --- .../v8/mjsunit/es6/unicode-escapes-in-regexps.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/implementation-contributed/v8/mjsunit/es6/unicode-escapes-in-regexps.js b/implementation-contributed/v8/mjsunit/es6/unicode-escapes-in-regexps.js index 2d2d11825d6..85e87fc97fe 100644 --- a/implementation-contributed/v8/mjsunit/es6/unicode-escapes-in-regexps.js +++ b/implementation-contributed/v8/mjsunit/es6/unicode-escapes-in-regexps.js @@ -283,3 +283,12 @@ assertNull(new RegExp("[\ud800\\{udc00}]", "u").exec("\u{10000}")); assertNull(/\u{d800}\u{dc00}+/u.exec("\ud800\udc00\udc00")); assertNull(/\ud800\u{dc00}+/u.exec("\ud800\udc00\udc00")); assertNull(/\u{d800}\udc00+/u.exec("\ud800\udc00\udc00")); + +// Non-simple case-insensitive mappings requiring special treatment. +// https://bugs.chromium.org/p/v8/issues/detail?id=13377 +assertFalse(/[\u0390]/ui.test("\u1fd3")); +assertFalse(/[\u1fd3]/ui.test("\u0390")); +assertFalse(/[\u03b0]/ui.test("\u1fe3")); +assertFalse(/[\u1fe3]/ui.test("\u03b0")); +assertFalse(/[\ufb05]/ui.test("\ufb06")); +assertFalse(/[\ufb06]/ui.test("\ufb05"));