diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-08-31 12:19:19 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-01 14:14:47 +0100 |
commit | da89cf9afbb6780f852079750ae22bd1dbc0bea7 (patch) | |
tree | 27356aa2fc317009d8a65f53ad1830357149e03d /Tests/LibUnicode/TestUnicodeLocale.cpp | |
parent | 8458f477a4c72d0382771e2a66afe1e9a6577027 (diff) | |
download | serenity-da89cf9afbb6780f852079750ae22bd1dbc0bea7.zip |
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.
Diffstat (limited to 'Tests/LibUnicode/TestUnicodeLocale.cpp')
-rw-r--r-- | Tests/LibUnicode/TestUnicodeLocale.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/LibUnicode/TestUnicodeLocale.cpp b/Tests/LibUnicode/TestUnicodeLocale.cpp index 878c6c2731..a536118de2 100644 --- a/Tests/LibUnicode/TestUnicodeLocale.cpp +++ b/Tests/LibUnicode/TestUnicodeLocale.cpp @@ -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); |