From 1cf03765801e3f391323bba3e040a8786017354a Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 24 Jun 2014 11:19:08 +0200 Subject: Correctly handle overriding of file tags via an empty list. Task-number: QBS-633 Change-Id: I4bf750ff94d6fae38fb3fdb49de265caddcd789e Reviewed-by: Joerg Bornemann --- .../auto/blackbox/testdata/empty-filetag-list/dontcompilethis.cpp | 1 + tests/auto/blackbox/testdata/empty-filetag-list/project.qbs | 8 ++++++++ tests/auto/blackbox/tst_blackbox.cpp | 6 ++++++ tests/auto/blackbox/tst_blackbox.h | 1 + 4 files changed, 16 insertions(+) create mode 100644 tests/auto/blackbox/testdata/empty-filetag-list/dontcompilethis.cpp create mode 100644 tests/auto/blackbox/testdata/empty-filetag-list/project.qbs (limited to 'tests/auto/blackbox') diff --git a/tests/auto/blackbox/testdata/empty-filetag-list/dontcompilethis.cpp b/tests/auto/blackbox/testdata/empty-filetag-list/dontcompilethis.cpp new file mode 100644 index 000000000..bac3b631d --- /dev/null +++ b/tests/auto/blackbox/testdata/empty-filetag-list/dontcompilethis.cpp @@ -0,0 +1 @@ +This is not C++. diff --git a/tests/auto/blackbox/testdata/empty-filetag-list/project.qbs b/tests/auto/blackbox/testdata/empty-filetag-list/project.qbs new file mode 100644 index 000000000..294616124 --- /dev/null +++ b/tests/auto/blackbox/testdata/empty-filetag-list/project.qbs @@ -0,0 +1,8 @@ +import qbs + +CppApplication { + Group { + files: "dontcompilethis.cpp" + fileTags: [] + } +} diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index d879245b3..ed4e704f5 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -1562,6 +1562,12 @@ void TestBlackbox::dynamicRuleOutputs() QVERIFY(!QFile::exists(sourceFile2)); } +void TestBlackbox::emptyFileTagList() +{ + QDir::setCurrent(testDataDir + "/empty-filetag-list"); + QCOMPARE(runQbs(), 0); +} + void TestBlackbox::erroneousFiles_data() { QTest::addColumn("errorMessage"); diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h index 9be7bef22..568d1c08e 100644 --- a/tests/auto/blackbox/tst_blackbox.h +++ b/tests/auto/blackbox/tst_blackbox.h @@ -115,6 +115,7 @@ private slots: void duplicateProductNames_data(); void dynamicLibs(); void dynamicRuleOutputs(); + void emptyFileTagList(); void erroneousFiles_data(); void erroneousFiles(); void explicitlyDependsOn(); -- cgit v1.2.3