Commit 01cee134 authored by pvuorela's avatar pvuorela

[mlocale] Fix ut_mcalendar test. Contributes to JB#52793

- Remove libicu44 debian package check. Huh.
- Skip time formatting even for basic test if not explicitly asked,
the locale data keeps continuously changing in ICU, no point
checking that here.
parent 5de5b558
......@@ -54,21 +54,6 @@ static QString maybeEmbedDateTimeString(const QString &dateTimeString, const MLo
void Ut_MCalendar::initTestCase()
{
QProcess process;
process.start("sh -c \"dpkg -s libicu44 | grep Version | perl -pe 's/^Version:[[:space:]]*([^[[:space:]]+)$/$1/g'\"");
if (!process.waitForFinished()) {
qDebug() << "cannot run process to check libicu44 package version , exiting ...";
exit(1);
}
icuPackageVersion = process.readAllStandardOutput();
icuPackageVersion.replace("\n", "");
qDebug() << "libicu44 package version is:" << icuPackageVersion;
QString fiResourceName = QString(ML_ICUEXTRADATA_DIR) + QDir::separator() + QString(ICUUSRDATA) + QDir::separator() + QString("fi.res");
qDebug() << "Finnish resource file:" << fiResourceName; //"/usr/share/meegotouch/icu/usrdt44l/fi.res"
QFile fiResource(fiResourceName);
QVERIFY2(fiResource.exists(), "File /usr/share/meegotouch/icu/usrdt44l/fi.res does not exist. The files in /usr/share/meegotouch/icu/usrdt44l/ are needed for this test, please check why they are missing.");
}
void Ut_MCalendar::cleanupTestCase()
......@@ -1099,27 +1084,6 @@ void Ut_MCalendar::testMLocaleCalendarConversionsFromLocaltimeQDateTime_data()
QTime time(12, 31, 0, 0);
QDateTime datetime(date, time, Qt::LocalTime);
#if !defined(ALSO_VERIFY_ICU_DOES_ITS_JOB_AS_WE_EXPECT)
QTest::newRow("21.7.2008_en_GB_Gregorian")
<< datetime
<< QString("en_GB") // language
<< QString("en_GB") // lc_messages
<< QString("en_GB") // lc_time
<< QString("en_GB") // lc_numeric
<< QString("Europe/Helsinki")
<< MLocale::LocaleDefaultTimeFormat24h
<< MLocale::GregorianCalendar
<< QString("21/07/2008")
<< QString("21 Jul 2008")
<< QString("21 July 2008")
<< QString("Monday, 21 July 2008")
<< QString("12:31")
<< QString("12:31:00")
<< QString("12:31:00 EEST")
<< QString("12:31:00 Eastern European Summer Time");
return;
#endif
QTest::newRow("21.7.2008_fi_FI_Gregorian")
<< datetime
<< QString("fi_FI") // language
......@@ -1532,6 +1496,10 @@ void Ut_MCalendar::testMLocaleCalendarConversionsFromLocaltimeQDateTime_data()
void Ut_MCalendar::testMLocaleCalendarConversionsFromLocaltimeQDateTime()
{
#if !defined(ALSO_VERIFY_ICU_DOES_ITS_JOB_AS_WE_EXPECT)
QSKIP("Icu Format strings change between releases. Skipping this test.");
#endif
QFETCH(QDateTime, datetime);
QFETCH(QString, localeName);
QFETCH(QString, lcMessages);
......
......@@ -52,9 +52,6 @@ class Ut_MCalendar : public QObject
{
Q_OBJECT
private:
QString icuPackageVersion;
private slots:
void initTestCase();
void cleanupTestCase();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment