aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/dynamicMultiplexRule/dynamicMultiplexRule.qbs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/testdata/dynamicMultiplexRule/dynamicMultiplexRule.qbs')
-rw-r--r--tests/auto/blackbox/testdata/dynamicMultiplexRule/dynamicMultiplexRule.qbs33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/dynamicMultiplexRule/dynamicMultiplexRule.qbs b/tests/auto/blackbox/testdata/dynamicMultiplexRule/dynamicMultiplexRule.qbs
new file mode 100644
index 000000000..d5315ac45
--- /dev/null
+++ b/tests/auto/blackbox/testdata/dynamicMultiplexRule/dynamicMultiplexRule.qbs
@@ -0,0 +1,33 @@
+import qbs
+import qbs.TextFile
+
+Project {
+ Product {
+ type: ["stuff"]
+ Group {
+ files: ["one.txt", "two.txt", "three.txt"]
+ fileTags: ["text"]
+ }
+ Rule {
+ multiplex: true
+ inputs: "text"
+ outputFileTags: ["stuff"]
+ outputArtifacts: {
+ return [{
+ filePath: "stuff-from-" + inputs.text.length + "-inputs",
+ fileTags: ["stuff"]
+ }];
+ }
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.silent = true;
+ cmd.sourceCode = function() {
+ var f = new TextFile(output.filePath, TextFile.WriteOnly);
+ f.write("narf!");
+ f.close();
+ }
+ return cmd;
+ }
+ }
+ }
+}