aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/tst_blackbox.cpp
diff options
context:
space:
mode:
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");