diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-05-11 23:27:29 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2015-05-13 16:41:00 +0000 |
commit | fe338544dceefe0af2513fef0d621818a3f1052b (patch) | |
tree | 385d173b87980dffdcea48be13e2fbb5617a2566 /tests/auto/blackbox/testdata/qbsVersion | |
parent | c4bdc55cb0709dec7cd9ca570792dbd635b61c60 (diff) | |
download | qbs-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.qbs | 22 |
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"; + } + } +} |