aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/trackFileTags/before/project.qbp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/testdata/trackFileTags/before/project.qbp')
-rw-r--r--tests/auto/blackbox/testdata/trackFileTags/before/project.qbp51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/trackFileTags/before/project.qbp b/tests/auto/blackbox/testdata/trackFileTags/before/project.qbp
new file mode 100644
index 000000000..50400f157
--- /dev/null
+++ b/tests/auto/blackbox/testdata/trackFileTags/before/project.qbp
@@ -0,0 +1,51 @@
+import qbs.base 1.0
+
+Project {
+ Product {
+ name: 'someapp'
+ type: 'application'
+ Depends { name: 'cpp' }
+ Group {
+ files: [ "main.cpp" ]
+ fileTags: [ "cpp" ]
+ }
+ }
+
+ Rule {
+ inputs: ["foosource"]
+ Artifact {
+ fileName: input.baseName + ".foo"
+ fileTags: ["foo"]
+ }
+
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.sourceCode = "var file = new TextFile(output.fileName, TextFile.WriteOnly);";
+ cmd.sourceCode += "file.truncate();"
+ cmd.sourceCode += "file.write(\"There's nothing to see here!\");"
+ cmd.sourceCode += "file.close();"
+ cmd.description = "generating something";
+ return cmd;
+ }
+ }
+
+ Rule {
+ inputs: ["foo"]
+ Artifact {
+ fileName: input.baseName + "_foo.cpp"
+ fileTags: ["cpp"]
+ }
+
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.sourceCode = "var file = new TextFile(output.fileName, TextFile.WriteOnly);";
+ cmd.sourceCode += "file.truncate();";
+ cmd.sourceCode += "file.write(\"// There's nothing to see here!\\n\");";
+ cmd.sourceCode += "file.write(\"int foo() { return 15; }\\n\");";
+ cmd.sourceCode += "file.close();";
+ cmd.description = "generating something";
+ return cmd;
+ }
+ }
+}
+