aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/tst_blackbox.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-06-10 15:39:43 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-06-10 15:40:17 +0200
commit13fab8abe3b6d12220b0e93f55a5be439893fd68 (patch)
tree77d50fc6f9b87168208c9abc25eb4dc4868649b4 /tests/auto/blackbox/tst_blackbox.cpp
parentcd97ec90e12e572c431fd6edd650afa95332a0e0 (diff)
parenta52f265fcd70b51acc15b0fc5000014f1b1fed29 (diff)
Merge remote-tracking branch 'origin/1.2'
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 eb3e01394..5ffb43961 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1553,6 +1553,28 @@ void TestBlackbox::dynamicRuleOutputs()
QVERIFY(!QFile::exists(sourceFile2));
}
+void TestBlackbox::erroneousFiles_data()
+{
+ QTest::addColumn<QString>("errorMessage");
+ QTest::newRow("nonexistentWorkingDir")
+ << "The working directory '/does/not/exist' for process 'ls' is invalid.";
+}
+
+void TestBlackbox::erroneousFiles()
+{
+ QFETCH(QString, errorMessage);
+ QDir::setCurrent(testDataDir + "/erroneous/" + QTest::currentDataTag());
+ QbsRunParameters params;
+ params.expectFailure = true;
+ QVERIFY(runQbs(params) != 0);
+ QString err = QString::fromLocal8Bit(m_qbsStderr);
+ if (!err.contains(errorMessage)) {
+ qDebug() << "Output: " << err;
+ qDebug() << "Expected: " << errorMessage;
+ QFAIL("Unexpected error message.");
+ }
+}
+
void TestBlackbox::explicitlyDependsOn()
{
QDir::setCurrent(testDataDir + "/explicitlyDependsOn");