diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-02-02 12:41:47 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-02-03 10:40:12 (GMT) |
commit | 470376b6e0574c8a6740e24229ade859a29817f1 (patch) | |
tree | 23faabc762c14281451595a80b1c64b3fe39555b /tests/auto/qlocale | |
parent | 3d2504305fa39903ab680d7199cb4bb5427167e8 (diff) | |
download | Qt-470376b6e0574c8a6740e24229ade859a29817f1.zip Qt-470376b6e0574c8a6740e24229ade859a29817f1.tar.gz Qt-470376b6e0574c8a6740e24229ade859a29817f1.tar.bz2 |
Fixes QLocale locale name parsing.
Allow BCP47 dash as a language-country separator.
This only changes it one way - parsing 'en-US' will work, but
QLocale::name() will still return name with underscore as separator.
Task-number: QTBUG-15835
Reviewed-by: João Abecasis
Diffstat (limited to 'tests/auto/qlocale')
-rw-r--r-- | tests/auto/qlocale/tst_qlocale.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp index 7e9b8ec..a01cacb 100644 --- a/tests/auto/qlocale/tst_qlocale.cpp +++ b/tests/auto/qlocale/tst_qlocale.cpp @@ -316,6 +316,8 @@ void tst_QLocale::ctor() TEST_CTOR("en_GB.bla", English, UnitedKingdom) TEST_CTOR("en_GB@.bla", English, UnitedKingdom) TEST_CTOR("en_GB@bla", English, UnitedKingdom) + TEST_CTOR("en-GB", English, UnitedKingdom) + TEST_CTOR("en-GB@bla", English, UnitedKingdom) Q_ASSERT(QLocale::Norwegian == QLocale::NorwegianBokmal); TEST_CTOR("no", Norwegian, Norway) @@ -326,6 +328,7 @@ void tst_QLocale::ctor() TEST_CTOR("nn_NO", NorwegianNynorsk, Norway) TEST_CTOR("es_ES", Spanish, Spain) TEST_CTOR("es_419", Spanish, LatinAmericaAndTheCaribbean) + TEST_CTOR("es-419", Spanish, LatinAmericaAndTheCaribbean) // test default countries for languages TEST_CTOR("mn", Mongolian, Mongolia) |