summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-07-02 01:57:58 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-07-02 01:57:58 (GMT)
commit00dedffa8ad1fdec14e9e0a9184f49343c42c846 (patch)
treea5afed25c0d996e387809d5b409c3025256976f8 /tests
parent092e530f2cd5357774c0bc7d09b453250be3fa74 (diff)
downloadQt-00dedffa8ad1fdec14e9e0a9184f49343c42c846.zip
Qt-00dedffa8ad1fdec14e9e0a9184f49343c42c846.tar.gz
Qt-00dedffa8ad1fdec14e9e0a9184f49343c42c846.tar.bz2
Don't accept *files* that exist when *directory* is required.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importFile.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importFile.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp1
3 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importFile.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importFile.errors.txt
new file mode 100644
index 0000000..3fdac09
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importFile.errors.txt
@@ -0,0 +1 @@
+1:1:"MyComponent.qml": no such directory
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importFile.qml b/tests/auto/declarative/qdeclarativelanguage/data/importFile.qml
new file mode 100644
index 0000000..a0d8410
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importFile.qml
@@ -0,0 +1,3 @@
+import "MyComponent.qml" 1.0
+
+MyComponent { text: "Hello" }
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 3ce356e..cde25d7 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -289,6 +289,7 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("importNonExistOlder (installed)") << "importNonExistOlder.qml" << "importNonExistOlder.errors.txt" << false;
QTest::newRow("importNewerVersion (installed)") << "importNewerVersion.qml" << "importNewerVersion.errors.txt" << false;
QTest::newRow("invalidImportID") << "invalidImportID.qml" << "invalidImportID.errors.txt" << false;
+ QTest::newRow("importFile") << "importFile.qml" << "importFile.errors.txt" << false;
QTest::newRow("signal.1") << "signal.1.qml" << "signal.1.errors.txt" << false;
QTest::newRow("signal.2") << "signal.2.qml" << "signal.2.errors.txt" << false;