diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/blackbox/testdata/not-always-updated/not-always-updated.qbs | 31 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 7 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.h | 1 |
3 files changed, 39 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/not-always-updated/not-always-updated.qbs b/tests/auto/blackbox/testdata/not-always-updated/not-always-updated.qbs new file mode 100644 index 000000000..8d6c1f5da --- /dev/null +++ b/tests/auto/blackbox/testdata/not-always-updated/not-always-updated.qbs @@ -0,0 +1,31 @@ +import qbs.TextFile + +Product { + type: "p" + Rule { + multiplex: true + Artifact { filePath: "dummy.txt"; fileTags: "t1"; alwaysUpdated: false } + prepare: { + var cmd = new JavaScriptCommand(); + cmd.description = "creating dummy"; + cmd.sourceCode = function() {}; + return cmd; + } + } + Rule { + inputs: "t1" + Artifact { filePath: "o.txt"; fileTags: "p" } + prepare: { + var cmd = new JavaScriptCommand; + cmd.description = "creating final"; + cmd.sourceCode = function() { + var f = new TextFile(output.filePath, TextFile.WriteOnly); + f.close(); + }; + return cmd; + } + } +} + + + diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 800ad5870..ea8b9bd52 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -4563,6 +4563,13 @@ void TestBlackbox::nonDefaultProduct() QVERIFY2(QFile::exists(nonDefaultAppExe), qPrintable(nonDefaultAppExe)); } +void TestBlackbox::notAlwaysUpdated() +{ + QDir::setCurrent(testDataDir + "/not-always-updated"); + QCOMPARE(runQbs(), 0); + QCOMPARE(runQbs(), 0); +} + static void switchProfileContents(qbs::Profile &p, qbs::Settings *s, bool on) { const QString scalarKey = "leaf.scalarProp"; diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h index 33aba02eb..92ba338ab 100644 --- a/tests/auto/blackbox/tst_blackbox.h +++ b/tests/auto/blackbox/tst_blackbox.h @@ -193,6 +193,7 @@ private slots: void nodejs(); void nonBrokenFilesInBrokenProduct(); void nonDefaultProduct(); + void notAlwaysUpdated(); void nsis(); void nsisDependencies(); void outOfDateMarking(); |