From 270253c4e268c2bef2e5995a95cbd92b75ed698d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 18 Jan 2022 11:07:27 +0100 Subject: deps: update V8 to 9.7.106.18 PR-URL: https://github.com/nodejs/node/pull/40907 Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- deps/v8/test/intl/intl.status | 18 +++++++++++++++- deps/v8/test/intl/regress-1074578.js | 3 ++- deps/v8/test/intl/string-localecompare.js | 36 +++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 deps/v8/test/intl/string-localecompare.js (limited to 'deps/v8/test/intl') diff --git a/deps/v8/test/intl/intl.status b/deps/v8/test/intl/intl.status index 8c223580db..4350e57bca 100644 --- a/deps/v8/test/intl/intl.status +++ b/deps/v8/test/intl/intl.status @@ -26,22 +26,37 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [ +################################################################################ [ALWAYS, { # TODO(jochen): The following test is flaky. 'overrides/caching': [PASS, FAIL], }], # ALWAYS +################################################################################ +['mode == debug', { + # Skip slow tests in debug mode. + 'general/empty-handle': [SKIP], +}], # mode == debug + +############################################################################## +['no_i18n', { + 'string-localecompare': [SKIP], +}], # no_i18n + +################################################################################ ['gc_stress', { # Push limit of stack, too flaky with machine with more memory. 'regress-1130489': [SKIP], }], # gc_stress +################################################################################ ['variant == no_wasm_traps', { '*': [SKIP], }], # variant == no_wasm_traps +################################################################################ ['system == windows', { - # noi18n cannot turn on ICU backend for Date + # noi18n cannot turn on ICU backend for Date. 'relative-time-format/default-locale-fr-CA': [SKIP], 'relative-time-format/default-locale-pt-BR': [SKIP], @@ -52,6 +67,7 @@ 'regress-7770': [SKIP], }], # system == windows' +################################################################################ ['system == android', { # Android's ICU data file does not have the Chinese/Japanese dictionary # required for the test to pass. diff --git a/deps/v8/test/intl/regress-1074578.js b/deps/v8/test/intl/regress-1074578.js index 3240b97545..d3f4d626dc 100644 --- a/deps/v8/test/intl/regress-1074578.js +++ b/deps/v8/test/intl/regress-1074578.js @@ -36,7 +36,8 @@ const d4 = new Date("2021-03-09T00:00Z"); assertEquals("March 8, 2020 at 5:00:00 PM PDT", df2.format(d3)); // Before tz2020a change will get "March 8, 2021 at 4:00:00 PM PST" -assertEquals("March 8, 2021 at 5:00:00 PM MST", df2.format(d4)); +// After tz2021a1 it now become "March 8, 2021 at 5:00:00 PM GMT-7". +assertEquals("March 8, 2021 at 5:00:00 PM GMT-7", df2.format(d4)); // C. Test America/Nuuk renamed from America/Godthab. diff --git a/deps/v8/test/intl/string-localecompare.js b/deps/v8/test/intl/string-localecompare.js new file mode 100644 index 0000000000..82bbcc92c8 --- /dev/null +++ b/deps/v8/test/intl/string-localecompare.js @@ -0,0 +1,36 @@ +// Copyright 2021 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Equal prefix. +assertTrue("asdf".localeCompare("asdf") == 0); +assertTrue("asd".localeCompare("asdf") < 0); +assertTrue("asdff".localeCompare("asdf") > 0); + +// Chars differ. +assertTrue("asdf".localeCompare("asdq") < 0); +assertTrue("asdq".localeCompare("asdf") > 0); + +// Interesting locales. +assertEquals('ö'.localeCompare('oe', 'de'), -1); +assertEquals('Ö'.localeCompare('oe', 'de'), -1); +assertEquals('ö'.localeCompare('o', 'de-u-co-phonebk'), 1); +assertEquals('ö'.localeCompare('p', 'de-u-co-phonebk'), -1); +assertEquals('Ö'.localeCompare('o', 'de-u-co-phonebk'), 1); +assertEquals('Ö'.localeCompare('p', 'de-u-co-phonebk'), -1); +assertEquals('ö'.localeCompare('o\u0308', 'de-u-co-phonebk'), 0); +assertEquals('ö'.localeCompare('O\u0308', 'de-u-co-phonebk'), -1); +assertEquals('Ö'.localeCompare('o\u0308', 'de-u-co-phonebk'), 1); +assertEquals('Ö'.localeCompare('O\u0308', 'de-u-co-phonebk'), 0); + +assertEquals('ch'.localeCompare('ca', 'cs-CZ'), 1); +assertEquals('AA'.localeCompare('A-A', 'th'), 0); + +// Attempt to hit different cases of the localeCompare fast path. +assertEquals('aAaaaö'.localeCompare('aaaaaö', 'en-US'), 1); +assertEquals('aaaaaöA'.localeCompare('aaaaaöa', 'en-US'), 1); +assertEquals('ab\u0308'.localeCompare('aa\u0308', 'en-US'), 1); +assertEquals('aA'.localeCompare('aaa', 'en-US'), -1); +assertEquals('aa'.localeCompare('aAa', 'en-US'), -1); +assertEquals('aA'.localeCompare('aa', 'en-US'), 1); +assertEquals('aa'.localeCompare('aA', 'en-US'), -1); -- cgit v1.2.1