aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-07-23 14:27:17 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-07-23 14:43:35 +0200
commitf0957392a79945b4b3edec98839d440cdb5f5fd6 (patch)
tree3013b1a13b82e7d746cd43ae8e0f039bd509d34e
parentc1767ae75e098ae224337cc2b8bd886be54c2e86 (diff)
Add autotest for tracking wildcard-related changes.
Namely, adding and removing files matched by patterns. This does not seem to be explicitly tested anywhere yet. Change-Id: I6d7b79500ee9e7375f22537da5db6a72057bbdee Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--tests/auto/blackbox/testdata/new-pattern-match/project.qbs5
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp23
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/new-pattern-match/project.qbs b/tests/auto/blackbox/testdata/new-pattern-match/project.qbs
new file mode 100644
index 000000000..18975da75
--- /dev/null
+++ b/tests/auto/blackbox/testdata/new-pattern-match/project.qbs
@@ -0,0 +1,5 @@
+import qbs
+
+Product {
+ files: "*.txt"
+}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 17864d813..0ee9ff2fd 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1839,6 +1839,29 @@ void TestBlackbox::mocCppIncluded()
QCOMPARE(runQbs(), 0);
}
+void TestBlackbox::newPatternMatch()
+{
+ QDir::setCurrent(testDataDir + "/new-pattern-match");
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(m_qbsStdout.contains("Resolving"));
+ waitForNewTimestamp();
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(!m_qbsStdout.contains("Resolving"));
+ waitForNewTimestamp();
+ QFile f("test.txt");
+ QVERIFY2(f.open(QIODevice::WriteOnly), qPrintable(f.errorString()));
+ f.close();
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(m_qbsStdout.contains("Resolving"));
+ waitForNewTimestamp();
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(!m_qbsStdout.contains("Resolving"));
+ waitForNewTimestamp();
+ f.remove();
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(m_qbsStdout.contains("Resolving"));
+}
+
void TestBlackbox::nonBrokenFilesInBrokenProduct()
{
QDir::setCurrent(testDataDir + "/non-broken-files-in-broken-product");
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 320039713..6573ad267 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -128,6 +128,7 @@ private slots:
void jsExtensionsTextFile();
void inheritQbsSearchPaths();
void mocCppIncluded();
+ void newPatternMatch();
void nonBrokenFilesInBrokenProduct();
void objC();
void qmlDebugging();