aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/tst_blackbox.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-08-05 11:14:26 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-08-06 11:27:03 +0200
commitfed87ed2e20632bc694c394cf44a30186f286cec (patch)
tree88f7093b86f48e3bb3fd3b658d88a7bea7128273 /tests/auto/blackbox/tst_blackbox.cpp
parent902fb4b96a60d947bb6fd5ee5aa4bdb4f30ee0cb (diff)
Add autotest for QBS-559.
This bug was fixed somewhat accidentally, so make sure it can't creep back in. Task-number: QBS-559 Change-Id: I3f85676f77cbc50b67f226810137860a7733fc6b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/blackbox/tst_blackbox.cpp')
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 1da1def94..7c5ce29f0 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1823,6 +1823,28 @@ void TestBlackbox::mocCppIncluded()
QCOMPARE(runQbs(), 0);
}
+void TestBlackbox::newOutputArtifactInDependency()
+{
+ QDir::setCurrent(testDataDir + "/new-output-artifact-in-dependency");
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(m_qbsStdout.contains("linking app"));
+ const QByteArray linkingLibString = QByteArray("linking ")
+ + HostOsInfo::dynamicLibraryName("lib").toLatin1();
+ QVERIFY(!m_qbsStdout.contains(linkingLibString));
+
+ waitForNewTimestamp();
+ QFile projectFile("project.qbs");
+ QVERIFY2(projectFile.open(QIODevice::ReadWrite), qPrintable(projectFile.errorString()));
+ QByteArray contents = projectFile.readAll();
+ contents.replace("//Depends", "Depends");
+ projectFile.resize(0);
+ projectFile.write(contents);
+ projectFile.close();
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(m_qbsStdout.contains("linking app"));
+ QVERIFY(m_qbsStdout.contains(linkingLibString));
+}
+
void TestBlackbox::newPatternMatch()
{
QDir::setCurrent(testDataDir + "/new-pattern-match");