summaryrefslogtreecommitdiff
path: root/tests/auto/blackbox/testdata/qbsVersion
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-05-11 23:27:29 -0700
committerJake Petroules <jake.petroules@petroules.com>2015-05-13 16:41:00 +0000
commitfe338544dceefe0af2513fef0d621818a3f1052b (patch)
tree385d173b87980dffdcea48be13e2fbb5617a2566 /tests/auto/blackbox/testdata/qbsVersion
parentc4bdc55cb0709dec7cd9ca570792dbd635b61c60 (diff)
downloadqbs-fe338544dceefe0af2513fef0d621818a3f1052b.tar.gz
Provide access to the Qbs version from project files.
Task-number: QBS-788 Change-Id: Ie6155e519a58cbddfaa1cf18787613376d89289f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'tests/auto/blackbox/testdata/qbsVersion')
-rw-r--r--tests/auto/blackbox/testdata/qbsVersion/qbs-version.qbs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/qbsVersion/qbs-version.qbs b/tests/auto/blackbox/testdata/qbsVersion/qbs-version.qbs
new file mode 100644
index 000000000..b07ee494e
--- /dev/null
+++ b/tests/auto/blackbox/testdata/qbsVersion/qbs-version.qbs
@@ -0,0 +1,22 @@
+import qbs
+
+Project {
+ property string qbsVersion
+ property int qbsVersionMajor
+ property int qbsVersionMinor
+ property int qbsVersionPatch
+
+ Product {
+ name: {
+ if (qbsVersion !== qbs.version ||
+ qbsVersionMajor !== qbs.versionMajor ||
+ qbsVersionMinor !== qbs.versionMinor ||
+ qbsVersionPatch !== qbs.versionPatch)
+ throw("expected "
+ + [qbsVersion, qbsVersionMajor, qbsVersionMinor, qbsVersionPatch].join(", ")
+ + ", got "
+ + [qbs.version, qbs.versionMajor, qbs.versionMinor, qbs.versionPatch].join(", "));
+ return "foo";
+ }
+ }
+}