diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/declarative/animations/data/badproperty1.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/animations/tst_animations.cpp | 2 | ||||
-rw-r--r-- | tests/auto/declarative/declarative.pro | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qmllanguage/data/I18nType30.qml (renamed from tests/auto/declarative/qmllanguage/data/I18nÁâãäå.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qmllanguage/data/i18nType.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp | 30 |
6 files changed, 28 insertions, 11 deletions
diff --git a/tests/auto/declarative/animations/data/badproperty1.qml b/tests/auto/declarative/animations/data/badproperty1.qml index a01753e..78da34a 100644 --- a/tests/auto/declarative/animations/data/badproperty1.qml +++ b/tests/auto/declarative/animations/data/badproperty1.qml @@ -16,7 +16,7 @@ Rectangle { } states: State { name: "state1" - PropertyChanges { target: MyRect; pen.color: "blue" } + PropertyChanges { target: MyRect; border.color: "blue" } } transitions: Transition { ColorAnimation { target: MyRect; to: "red"; properties: "pen.colr"; duration: 1000 } diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp index 0e46224..336f0d3 100644 --- a/tests/auto/declarative/animations/tst_animations.cpp +++ b/tests/auto/declarative/animations/tst_animations.cpp @@ -86,7 +86,7 @@ void tst_animations::dotProperty() QTest::qWait(animation.duration() + 50); QCOMPARE(rect.border()->width(), 10); - rect.border()->setWidth(1); + rect.border()->setWidth(0); animation.start(); animation.pause(); animation.setCurrentTime(125); diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index eef9da7..b51e285 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -25,9 +25,6 @@ SUBDIRS += anchors \ states \ visual -SUBDIRS -= examples # Human-interactive - # Tests which should run in Pulse PULSE_TESTS = $$SUBDIRS -PULSE_TESTS -= visual # All except 'visual' tests, allegedly too flaky diff --git a/tests/auto/declarative/qmllanguage/data/I18nÁâãäå.qml b/tests/auto/declarative/qmllanguage/data/I18nType30.qml index 42dbc69..42dbc69 100644 --- a/tests/auto/declarative/qmllanguage/data/I18nÁâãäå.qml +++ b/tests/auto/declarative/qmllanguage/data/I18nType30.qml diff --git a/tests/auto/declarative/qmllanguage/data/i18nType.qml b/tests/auto/declarative/qmllanguage/data/i18nType.qml index 11ef895..d7954ef 100644 --- a/tests/auto/declarative/qmllanguage/data/i18nType.qml +++ b/tests/auto/declarative/qmllanguage/data/i18nType.qml @@ -1 +1 @@ -I18nÁâãäå { } +I18nTypeÁâãäå { } diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index b99d040..b68d9bf 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -24,6 +24,8 @@ public: } private slots: + void initTestCase(); + void cleanupTestCase(); void errors_data(); void errors(); @@ -116,6 +118,24 @@ inline QUrl TEST_FILE(const char *filename) return TEST_FILE(QLatin1String(filename)); } +void tst_qmllanguage::initTestCase() +{ + // Create locale-specific file + // For POSIX, this will just be data/I18nType.qml, since POSIX is 7-bit + // For iso8859-1 locale, this will just be data/I18nType?????.qml where ????? is 5 8-bit characters + // For utf-8 locale, this will be data/I18nType??????????.qml where ?????????? is 5 8-bit characters, UTF-8 encoded + QFile in(TEST_FILE(QLatin1String("I18nType30.qml")).toLocalFile()); + QVERIFY(in.open(QIODevice::ReadOnly)); + QFile out(TEST_FILE(QString::fromUtf8("I18nType\303\241\303\242\303\243\303\244\303\245.qml")).toLocalFile()); + QVERIFY(out.open(QIODevice::WriteOnly)); + out.write(in.readAll()); +} + +void tst_qmllanguage::cleanupTestCase() +{ + QVERIFY(QFile::remove(TEST_FILE(QString::fromUtf8("I18nType\303\241\303\242\303\243\303\244\303\245.qml")).toLocalFile())); +} + void tst_qmllanguage::errors_data() { QTest::addColumn<QString>("file"); @@ -686,11 +706,11 @@ void tst_qmllanguage::i18n_data() { QTest::addColumn<QString>("file"); QTest::addColumn<QString>("stringProperty"); - QTest::newRow("i18nStrings") << "i18nStrings.qml" << QString::fromUtf8("Test áâãäå (5 accented 'a' letters)"); - QTest::newRow("i18nDeclaredPropertyNames") << "i18nDeclaredPropertyNames.qml" << QString::fromUtf8("Test áâãäå: 10"); - QTest::newRow("i18nDeclaredPropertyUse") << "i18nDeclaredPropertyUse.qml" << QString::fromUtf8("Test áâãäå: 15"); - QTest::newRow("i18nScript") << "i18nScript.qml" << QString::fromUtf8("Test áâãäå: 20"); - QTest::newRow("i18nType") << "i18nType.qml" << QString::fromUtf8("Test áâãäå: 30"); + QTest::newRow("i18nStrings") << "i18nStrings.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245 (5 accented 'a' letters)"); + QTest::newRow("i18nDeclaredPropertyNames") << "i18nDeclaredPropertyNames.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 10"); + QTest::newRow("i18nDeclaredPropertyUse") << "i18nDeclaredPropertyUse.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 15"); + QTest::newRow("i18nScript") << "i18nScript.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 20"); + QTest::newRow("i18nType") << "i18nType.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 30"); } void tst_qmllanguage::i18n() |