diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-05-18 04:51:58 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-05-18 05:07:44 (GMT) |
commit | 3d1a6596c6a381b71718af22eb8a861830ec7b6b (patch) | |
tree | 9e7be18bdb1358c6c460a12a19653922c0409352 /tests/auto/declarative/qdeclarativelanguage | |
parent | 690ad58e03fb064e90e2e66e96419d82d9ee343d (diff) | |
download | Qt-3d1a6596c6a381b71718af22eb8a861830ec7b6b.zip Qt-3d1a6596c6a381b71718af22eb8a861830ec7b6b.tar.gz Qt-3d1a6596c6a381b71718af22eb8a861830ec7b6b.tar.bz2 |
Make sure strings are escaped when returned via asScript.
Makes 273024e58d90bb9b3a5da0161f884f1af22d75df more correct.
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage')
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml index 4c5a122..ba3545e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml @@ -1,6 +1,6 @@ import Test 1.0 MyQmlObject { - onBasicSignal: " " + onBasicSignal: " " } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml index 0de3667..c42da2b 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml @@ -1,5 +1,5 @@ import Test 1.0 MyTypeObject { - scriptProperty: "hello world" + scriptProperty: "hello\n\"world\"" } diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index b72c75f..cb2764f 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -351,7 +351,8 @@ void tst_qdeclarativelanguage::errors_data() QTest::newRow("invalidAttachedProperty.12") << "invalidAttachedProperty.12.qml" << "invalidAttachedProperty.12.errors.txt" << false; QTest::newRow("invalidAttachedProperty.13") << "invalidAttachedProperty.13.qml" << "invalidAttachedProperty.13.errors.txt" << false; - QTest::newRow("emptySignal") << "emptySignal.qml" << "emptySignal.errors.txt" << false; + //### this is no longer considered empty (and should produce a different error: QTBUG-10764) + //QTest::newRow("emptySignal") << "emptySignal.qml" << "emptySignal.errors.txt" << false; QTest::newRow("emptySignal.2") << "emptySignal.2.qml" << "emptySignal.2.errors.txt" << false; QTest::newRow("nestedErrors") << "nestedErrors.qml" << "nestedErrors.errors.txt" << false; @@ -1127,8 +1128,7 @@ void tst_qdeclarativelanguage::scriptString() MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create()); QVERIFY(object != 0); - QEXPECT_FAIL("", "Variant.asScript() returns incorrect value for string (bug pending)", Continue); - QCOMPARE(object->scriptProperty().script(), QString("\"hello world\"")); + QCOMPARE(object->scriptProperty().script(), QString("\"hello\\n\\\"world\\\"\"")); } { |