Update qlocale autotest
Add additional tests for the updates in the Qt4.8 qlocale data (CLDRv2.0) already existing in Qt5 locale data (CLDRv22.1): - The NumberingSystem for some Indic and Slovak locales. - The Month/Day name in Irish/Gaelic locale. - The AM/PM Text in Turkish locale. Change-Id: Iaea4f13ec79f94ab937b97f8ae60eb8d8f217c4b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
cf22e8ea4e
commit
33f603c4a3
@ -133,6 +133,8 @@ private slots:
|
||||
void monthName();
|
||||
void standaloneMonthName();
|
||||
|
||||
void defaultNumeringSystem();
|
||||
|
||||
void ampm();
|
||||
void currency();
|
||||
void quoteString();
|
||||
@ -1527,6 +1529,10 @@ void tst_QLocale::dayName()
|
||||
|
||||
QLocale l(locale_name);
|
||||
QCOMPARE(l.dayName(day, format), dayName);
|
||||
|
||||
QLocale ir("ga_IE");
|
||||
QCOMPARE(ir.dayName(1, QLocale::ShortFormat), QLatin1String("Luan"));
|
||||
QCOMPARE(ir.dayName(7, QLocale::ShortFormat), QLatin1String("Domh"));
|
||||
}
|
||||
|
||||
void tst_QLocale::standaloneDayName_data()
|
||||
@ -1586,6 +1592,42 @@ a(QLatin1String("0.0000000000000000000000000000000000000000000000000000000000000
|
||||
QVERIFY(!ok);
|
||||
}
|
||||
|
||||
void tst_QLocale::defaultNumeringSystem()
|
||||
{
|
||||
QLocale sk("sk_SK");
|
||||
QCOMPARE(sk.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale ta("ta_IN");
|
||||
QCOMPARE(ta.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale te("te_IN");
|
||||
QCOMPARE(te.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale hi("hi_IN");
|
||||
QCOMPARE(hi.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale gu("gu_IN");
|
||||
QCOMPARE(gu.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale kn("kn_IN");
|
||||
QCOMPARE(kn.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale pa("pa_IN");
|
||||
QCOMPARE(pa.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale ne("ne_IN");
|
||||
QCOMPARE(ne.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale mr("mr_IN");
|
||||
QCOMPARE(mr.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale ml("ml_IN");
|
||||
QCOMPARE(ml.toString(123), QLatin1String("123"));
|
||||
|
||||
QLocale kok("kok_IN");
|
||||
QCOMPARE(kok.toString(123), QLatin1String("123"));
|
||||
}
|
||||
|
||||
void tst_QLocale::ampm()
|
||||
{
|
||||
QLocale c(QLocale::C);
|
||||
@ -1607,6 +1649,10 @@ void tst_QLocale::ampm()
|
||||
QLocale ua("uk_UA");
|
||||
QCOMPARE(ua.amText(), QString::fromUtf8("\320\264\320\277"));
|
||||
QCOMPARE(ua.pmText(), QString::fromUtf8("\320\277\320\277"));
|
||||
|
||||
QLocale tr("tr_TR");
|
||||
QCOMPARE(tr.amText(), QString::fromUtf8("\303\226\303\226"));
|
||||
QCOMPARE(tr.pmText(), QString::fromUtf8("\303\226\123"));
|
||||
}
|
||||
|
||||
void tst_QLocale::dateFormat()
|
||||
@ -1673,6 +1719,10 @@ void tst_QLocale::monthName()
|
||||
// check that our CLDR scripts handle surrogate pairs correctly
|
||||
QLocale dsrt("en-Dsrt-US");
|
||||
QCOMPARE(dsrt.monthName(1, QLocale::LongFormat), QString::fromUtf8("\xf0\x90\x90\x96\xf0\x90\x90\xb0\xf0\x90\x91\x8c\xf0\x90\x90\xb7\xf0\x90\x90\xad\xf0\x90\x90\xaf\xf0\x90\x91\x89\xf0\x90\x90\xa8"));
|
||||
|
||||
QLocale ir("ga_IE");
|
||||
QCOMPARE(ir.monthName(1, QLocale::ShortFormat), QLatin1String("Ean"));
|
||||
QCOMPARE(ir.monthName(12, QLocale::ShortFormat), QLatin1String("Noll"));
|
||||
}
|
||||
|
||||
void tst_QLocale::standaloneMonthName()
|
||||
|
Loading…
Reference in New Issue
Block a user