diff options
-rw-r--r-- | tests/auto/blackbox/testdata/new-pattern-match/project.qbs | 5 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 23 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.h | 1 |
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(); |