diff options
author | Michaël Zasso <targos@protonmail.com> | 2022-01-18 11:07:27 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2022-01-20 10:38:37 +0100 |
commit | 270253c4e268c2bef2e5995a95cbd92b75ed698d (patch) | |
tree | 218d63bbbf805a689fb2f29921f6a8a7d6bedbb5 /deps/v8/test/intl | |
parent | 5a407d606abec9f111247fd568f9028e0da52995 (diff) | |
download | node-new-270253c4e268c2bef2e5995a95cbd92b75ed698d.tar.gz |
deps: update V8 to 9.7.106.18
PR-URL: https://github.com/nodejs/node/pull/40907
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'deps/v8/test/intl')
-rw-r--r-- | deps/v8/test/intl/intl.status | 18 | ||||
-rw-r--r-- | deps/v8/test/intl/regress-1074578.js | 3 | ||||
-rw-r--r-- | deps/v8/test/intl/string-localecompare.js | 36 |
3 files changed, 55 insertions, 2 deletions
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); |