Skip to content

Commit

Permalink
Remove Qt4 .deb checking
Browse files Browse the repository at this point in the history
This hasn't really made much sense ever
  • Loading branch information
pvuorela committed Oct 2, 2019
1 parent df8f3ad commit 6418a9a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 91 deletions.
105 changes: 17 additions & 88 deletions tests/ft_locales/ft_locales.cpp
Expand Up @@ -31,15 +31,6 @@ class TestLocale : public MLocale

void Ft_Locales::initTestCase()
{
QProcess process;
process.start("sh -c \"dpkg -s libqtcore4 | grep Version | perl -pe 's/^Version:[[:space:]]*([^[[:space:]]+)$/$1/g'\"");
if (!process.waitForFinished()) {
qDebug() << "cannot run process to check libqtcore4 package version , exiting ...";
exit(1);
}
libqtcore4PackageVersion = process.readAllStandardOutput();
libqtcore4PackageVersion.replace("\n", "");
qDebug() << "libqtcore4 package version is:" << libqtcore4PackageVersion;
}

void Ft_Locales::cleanupTestCase()
Expand Down Expand Up @@ -964,28 +955,15 @@ void Ft_Locales::testMLocaleToLower_data()
<< QString("item naïve i̇")
;

if(libqtcore4PackageVersion >= "4.7.2~git20110119"
&& libqtcore4PackageVersion < "4.7.4~git20110516-0maemo2") { // Qt uses libicu
QTest::newRow("tr_TR")
<< QString("tr_TR")
<< QString("ITEM NAÏVE İ")
// I lowercases to ı in Turkish locale and İ to i
<< QString("ıtem naïve i")
// Qt’s toLower uses libicu now and thus works
<< QString("ıtem naïve i")
;
}
else {
QTest::newRow("tr_TR")
QTest::newRow("tr_TR")
<< QString("tr_TR")
<< QString("ITEM NAÏVE İ")
// I lowercases to ı in Turkish locale and İ to i
// I lowercases to ı in Turkish locale and İ to i
<< QString("ıtem naïve i")
// Qt’s toLower is *not* locale aware
// last two chars are U+0069 (LATIN SMALL LETTER I) U+307 (COMBINING DOT ABOVE)
// Qt’s toLower is *not* locale aware
// last two chars are U+0069 (LATIN SMALL LETTER I) U+307 (COMBINING DOT ABOVE)
<< QString("item naïve i̇")
;
}
;

QTest::newRow("en_GB")
<< QString("de_GB")
Expand All @@ -1001,49 +979,23 @@ void Ft_Locales::testMLocaleToLower_data()
<< QString("σι")
;

if(libqtcore4PackageVersion >= "4.7.2~git20110119"
&& libqtcore4PackageVersion < "4.7.4~git20110516-0maemo2") { // Qt uses libicu
QTest::newRow("en_GB")
<< QString("en_GB")
<< QString("ΙΣ")
<< QString("ις")
// Qt’s toLower is now context aware and lowercases the final Σ
// correctly using ICU
<< QString("ις")
;
}
else {
QTest::newRow("en_GB")
QTest::newRow("en_GB")
<< QString("en_GB")
<< QString("ΙΣ")
<< QString("ις")
// Qt’s toLower is *not* context aware and lowercases the final Σ
// the same way as a non-final one:
// Qt’s toLower is *not* context aware and lowercases the final Σ
// the same way as a non-final one:
<< QString("ισ")
;
}
;

if(libqtcore4PackageVersion >= "4.7.2~git20110119"
&& libqtcore4PackageVersion < "4.7.4~git20110516-0maemo2") { // Qt uses libicu
QTest::newRow("el_GR")
<< QString("el_GR")
<< QString("ΙΣ")
<< QString("ις")
// Qt’s toLower is now context aware and lowercases the final Σ
// correctly using ICU
<< QString("ις")
;
}
else {
QTest::newRow("el_GR")
QTest::newRow("el_GR")
<< QString("el_GR")
<< QString("ΙΣ")
<< QString("ις")
// Qt’s toLower is *not* context aware and lowercases the final Σ
// the same way as a non-final one:
// Qt’s toLower is *not* context aware and lowercases the final Σ
// the same way as a non-final one:
<< QString("ισ")
;
}
;

QTest::newRow("en_GB")
<< QString("en_GB")
Expand Down Expand Up @@ -1195,23 +1147,12 @@ void Ft_Locales::testMLocaleToUpper_data()
<< QString("ITEM NAÏVE I")
;

if(libqtcore4PackageVersion >= "4.7.2~git20110119"
&& libqtcore4PackageVersion < "4.7.4~git20110516-0maemo2") { // Qt uses libicu
QTest::newRow("tr_TR")
<< QString("tr_TR")
<< QString("item naïve ı")
<< QString("İTEM NAÏVE I")
<< QString("İTEM NAÏVE I") // works because Qt’s toUpper uses libicu now
;
}
else {
QTest::newRow("tr_TR")
QTest::newRow("tr_TR")
<< QString("tr_TR")
<< QString("item naïve ı")
<< QString("İTEM NAÏVE I")
<< QString("ITEM NAÏVE I")
;
}
;

QTest::newRow("en_GB")
<< QString("en_GB")
Expand All @@ -1220,24 +1161,12 @@ void Ft_Locales::testMLocaleToUpper_data()
<< QString("") // U+0049 (LATIN CAPITAL LETTER I) U+0307 (COMBINING DOT ABOVE)
;

if(libqtcore4PackageVersion >= "4.7.2~git20110119"
&& libqtcore4PackageVersion < "4.7.4~git20110516-0maemo2") { // Qt uses libicu
QTest::newRow("tr_TR")
<< QString("tr_TR")
<< QString("") // U+0069 (LATIN SMALL LETTER I) U+0307 (COMBINING DOT ABOVE)
<< QString("İ̇") // U+0130 (LATIN CAPITAL LETTER I WITH DOT ABOVE) U+0307 (COMBINING DOT ABOVE)
// works because Qt’s toUpper uses libicu now
<< QString("İ̇") // U+0130 (LATIN CAPITAL LETTER I WITH DOT ABOVE) U+0307 (COMBINING DOT ABOVE)
;
}
else {
QTest::newRow("tr_TR")
QTest::newRow("tr_TR")
<< QString("tr_TR")
<< QString("") // U+0069 (LATIN SMALL LETTER I) U+0307 (COMBINING DOT ABOVE)
<< QString("İ̇") // U+0130 (LATIN CAPITAL LETTER I WITH DOT ABOVE) U+0307 (COMBINING DOT ABOVE)
<< QString("") // U+0049 (LATIN CAPITAL LETTER I) U+0307 (COMBINING DOT ABOVE)
;
}
;

QTest::newRow("en_GB")
<< QString("en_GB")
Expand Down
3 changes: 0 additions & 3 deletions tests/ft_locales/ft_locales.h
Expand Up @@ -54,9 +54,6 @@ class Ft_Locales : public QObject
{
Q_OBJECT

private:
QString libqtcore4PackageVersion;

private slots:
void initTestCase();
void cleanupTestCase();
Expand Down

0 comments on commit 6418a9a

Please sign in to comment.