aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/qmllint/data/Empty.js0
-rw-r--r--tests/auto/qml/qmllint/data/badScript.qml6
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp4
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/Empty.js b/tests/auto/qml/qmllint/data/Empty.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Empty.js
diff --git a/tests/auto/qml/qmllint/data/badScript.qml b/tests/auto/qml/qmllint/data/badScript.qml
new file mode 100644
index 0000000000..13f3e33acc
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/badScript.qml
@@ -0,0 +1,6 @@
+import QtQml
+import "Empty.js" as Foo
+
+QtObject {
+ objectName: Foo.stuff()
+}
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index f5ef58940b..c1ccae7235 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -269,6 +269,10 @@ void TestQmllint::dirtyQmlCode_data()
<< QStringLiteral("badAliasObject.qml")
<< QString("Warning: Property \"wrongwrongwrong\" not found on type \"QtObject\"")
<< QString();
+ QTest::newRow("badScript")
+ << QStringLiteral("badScript.qml")
+ << QString("Warning: Property \"stuff\" not found on type \"Empty\"")
+ << QString();
}
void TestQmllint::dirtyQmlCode()