summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-07-05 23:59:41 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-07-05 23:59:41 (GMT)
commitcabdb16f5ea6458dec9a2ec3b70a01e498b27dbc (patch)
tree5c7bea7f618edb91be5d365913324967857e89e2 /tests
parent48fa690558a8a73b6845aaea13fc29965150e733 (diff)
downloadQt-cabdb16f5ea6458dec9a2ec3b70a01e498b27dbc.zip
Qt-cabdb16f5ea6458dec9a2ec3b70a01e498b27dbc.tar.gz
Qt-cabdb16f5ea6458dec9a2ec3b70a01e498b27dbc.tar.bz2
Fix inconsistent reporting of module import errors when using versions.
Task-number: QTBUG-11936
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/qmldir2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp9
5 files changed, 13 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir
index 0adb0f6..d15720a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir
@@ -2,4 +2,3 @@ Rectangle 1.5 InstalledTest2.qml
LocalLast 1.0 LocalLast.qml
InstalledTest 1.4 InstalledTest2.qml
InstalledTest 1.0 InstalledTest.qml
-InstalledTestTP 0.0 InstalledTest.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml
new file mode 100644
index 0000000..303b5a5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml
@@ -0,0 +1,2 @@
+import Qt 4.7 as Qt47
+Qt47.Rectangle {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml
new file mode 100644
index 0000000..8c953cb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml
@@ -0,0 +1,2 @@
+import Qt 4.7
+Text {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/qmldir b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/qmldir
new file mode 100644
index 0000000..b301226
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/qmldir
@@ -0,0 +1,2 @@
+InstalledTest 1.4 InstalledTest2.qml
+InstalledTestTP 0.0 InstalledTest.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index cde25d7..fcdf926 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -1477,12 +1477,12 @@ void tst_qdeclarativelanguage::importsInstalled_data()
// import installed
QTest::newRow("installed import 0")
- << "import com.nokia.installedtest 0.0\n"
+ << "import com.nokia.installedtest0 0.0\n"
"InstalledTestTP {}"
<< "QDeclarativeRectangle"
<< "";
QTest::newRow("installed import 0 as TP")
- << "import com.nokia.installedtest 0.0 as TP\n"
+ << "import com.nokia.installedtest0 0.0 as TP\n"
"TP.InstalledTestTP {}"
<< "QDeclarativeRectangle"
<< "";
@@ -1501,6 +1501,11 @@ void tst_qdeclarativelanguage::importsInstalled_data()
"InstalledTest {}"
<< "QDeclarativeText"
<< "";
+ QTest::newRow("installed import minor version not available") // QTBUG-11936
+ << "import com.nokia.installedtest 0.1\n"
+ "InstalledTest {}"
+ << ""
+ << "module \"com.nokia.installedtest\" version 0.1 is not installed";
QTest::newRow("installed import minor version not available") // QTBUG-9627
<< "import com.nokia.installedtest 1.10\n"
"InstalledTest {}"