mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 12:05:07 +00:00
LibUnicode: Canonicalize calendar subtags
Calendar subtags are a bit of an odd-man-out in that we must match the variants "ethiopic-amete-alem" in that order, without any other variant in the locale. So a separate method is needed for this, and we now defer sorting the variant list until after other canonicalization is done.
This commit is contained in:
parent
8458f477a4
commit
da89cf9afb
2 changed files with 35 additions and 6 deletions
|
@ -320,6 +320,14 @@ TEST_CASE(canonicalize_unicode_locale_id)
|
|||
test("EN-U-TZ-HONGKONG"sv, "en-u-tz-hkhkg"sv);
|
||||
test("en-u-ta-hongkong"sv, "en-u-ta-hongkong"sv);
|
||||
test("EN-U-TA-HONGKONG"sv, "en-u-ta-hongkong"sv);
|
||||
test("en-u-ca-ethiopic-amete-alem"sv, "en-u-ca-ethioaa"sv);
|
||||
test("EN-U-CA-ETHIOPIC-AMETE-ALEM"sv, "en-u-ca-ethioaa"sv);
|
||||
test("en-u-ca-alem-ethiopic-amete"sv, "en-u-ca-alem-ethiopic-amete"sv);
|
||||
test("EN-U-CA-ALEM-ETHIOPIC-AMETE"sv, "en-u-ca-alem-ethiopic-amete"sv);
|
||||
test("en-u-ca-ethiopic-amete-xxx-alem"sv, "en-u-ca-ethiopic-amete-xxx-alem"sv);
|
||||
test("EN-U-CA-ETHIOPIC-AMETE-XXX-ALEM"sv, "en-u-ca-ethiopic-amete-xxx-alem"sv);
|
||||
test("en-u-cb-ethiopic-amete-alem"sv, "en-u-cb-ethiopic-amete-alem"sv);
|
||||
test("EN-U-CB-ETHIOPIC-AMETE-ALEM"sv, "en-u-cb-ethiopic-amete-alem"sv);
|
||||
|
||||
test("en-t-en"sv, "en-t-en"sv);
|
||||
test("EN-T-EN"sv, "en-t-en"sv);
|
||||
|
@ -345,6 +353,8 @@ TEST_CASE(canonicalize_unicode_locale_id)
|
|||
test("EN-T-K1-IMPERIAL"sv, "en-t-k1-imperial"sv);
|
||||
test("en-t-k1-hongkong"sv, "en-t-k1-hongkong"sv);
|
||||
test("EN-T-K1-HONGKONG"sv, "en-t-k1-hongkong"sv);
|
||||
test("en-t-k1-ethiopic-amete-alem"sv, "en-t-k1-ethiopic-amete-alem"sv);
|
||||
test("EN-T-K1-ETHIOPIC-AMETE-ALEM"sv, "en-t-k1-ethiopic-amete-alem"sv);
|
||||
|
||||
test("en-0-aaa"sv, "en-0-aaa"sv);
|
||||
test("EN-0-AAA"sv, "en-0-aaa"sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue