summaryrefslogtreecommitdiff
path: root/tests/auto/blackbox/tst_blackboxqt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/tst_blackboxqt.cpp')
-rw-r--r--tests/auto/blackbox/tst_blackboxqt.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackboxqt.cpp b/tests/auto/blackbox/tst_blackboxqt.cpp
index 71f384b7a..14086401e 100644
--- a/tests/auto/blackbox/tst_blackboxqt.cpp
+++ b/tests/auto/blackbox/tst_blackboxqt.cpp
@@ -256,6 +256,31 @@ void TestBlackboxQt::qtScxml()
m_qbsStdout.constData());
}
+void TestBlackboxQt::removeMocHeaderFromFileList()
+{
+ QDir::setCurrent(testDataDir + "/remove-moc-header-from-file-list");
+ QCOMPARE(runQbs(), 0);
+ WAIT_FOR_NEW_TIMESTAMP();
+ QFile projectFile("remove-moc-header-from-file-list.qbs");
+ QVERIFY2(projectFile.open(QIODevice::ReadWrite), qPrintable(projectFile.errorString()));
+ QByteArray content = projectFile.readAll();
+ content.replace("\"file.h\"", "// \"file.h\"");
+ projectFile.resize(0);
+ projectFile.write(content);
+ projectFile.close();
+ QbsRunParameters params;
+ params.expectFailure = true;
+ QVERIFY(runQbs(params) != 0);
+ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY2(projectFile.open(QIODevice::ReadWrite), qPrintable(projectFile.errorString()));
+ content = projectFile.readAll();
+ content.replace("// \"file.h\"", "\"file.h\"");
+ projectFile.resize(0);
+ projectFile.write(content);
+ projectFile.close();
+ QCOMPARE(runQbs(), 0);
+}
+
void TestBlackboxQt::staticQtPluginLinking()
{