Bug 216526 - [GTK][WPE] test262 Locale.minimize tests depend on unreleased ICU patch
Summary: [GTK][WPE] test262 Locale.minimize tests depend on unreleased ICU patch
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-14 21:33 PDT by Lauro Moura
Modified: 2020-09-18 00:14 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-09-14 21:33:23 PDT
FAIL test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js (default)
Full Output:
Exception: Test262Error: "und".minimize() should be "en" Expected SameValue(«und», «en») to be true

FAIL test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js (strict mode)
Full Output:
Exception: Test262Error: "und".minimize() should be "en" Expected SameValue(«und», «en») to be true

ECMA spec: https://tc39.es/ecma402/#sec-Intl.Locale.prototype.minimize
Unicode spec: http://www.unicode.org/reports/tr35/#Likely_Subtags
Upstream test: https://github.com/tc39/test262/blame/main/test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js#L1

Using icu4c 67.1 after https://github.com/unicode-org/icu/pull/1140 (commit ec7e29f2b697188e5a667db2b235a3d0db8a5d20):

uloc_minimizeSubtags(nullptr) -> "en"
uloc_minimizeSubtags("") -> "en"
uloc_minimizeSubtags("und") -> "en"
uloc_minimizeSubtags("und-Thai") -> "th"

Using icu4c before it:

uloc_minimizeSubtags(nullptr) -> "en"
uloc_minimizeSubtags("und") -> ""
uloc_minimizeSubtags("") -> ""
uloc_minimizeSubtags("und-Thai") -> "-Thai"

As "und" language gets translated to an empty string in IntlObject.cpp, the test fails with the current ICU behavior.