diff options
Diffstat (limited to 'tests/auto/blackbox/testdata/trackFileTags/after/project.qbp')
-rw-r--r-- | tests/auto/blackbox/testdata/trackFileTags/after/project.qbp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/trackFileTags/after/project.qbp b/tests/auto/blackbox/testdata/trackFileTags/after/project.qbp new file mode 100644 index 000000000..453658e98 --- /dev/null +++ b/tests/auto/blackbox/testdata/trackFileTags/after/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: [ "foosource", "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; + } + } +} + |