diff options
| author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-07-17 14:16:08 +0200 |
|---|---|---|
| committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-07-20 11:55:49 +0000 |
| commit | c336ca390996dcc0aad5d0a12b84891477f74939 (patch) | |
| tree | a7f942ff77ba010724aabd7f4cd145e33ee5a8db | |
| parent | 96dbcb09924239e7f7dc6547e29cb28003bbe5be (diff) | |
| download | qbs-c336ca390996dcc0aad5d0a12b84891477f74939.tar.gz | |
Add autotest.
For a bug we used to have regarding list properties set
in a Properties item when the condition was invalid.
Change-Id: I177548c047a1ea2de26ff03f4b556c2d5b22948b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| -rw-r--r-- | src/lib/corelib/language/testdata/erroneous/properties-item-with-invalid-condition.qbs | 9 | ||||
| -rw-r--r-- | src/lib/corelib/language/tst_language.cpp | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/corelib/language/testdata/erroneous/properties-item-with-invalid-condition.qbs b/src/lib/corelib/language/testdata/erroneous/properties-item-with-invalid-condition.qbs new file mode 100644 index 000000000..00e3267c2 --- /dev/null +++ b/src/lib/corelib/language/testdata/erroneous/properties-item-with-invalid-condition.qbs @@ -0,0 +1,9 @@ +import qbs + +Product { + Depends { name: "cpp" } + Properties { + condition: cpp.nonexistingproperty.contains("somevalue") + cpp.defines: ["ABC"] + } +} diff --git a/src/lib/corelib/language/tst_language.cpp b/src/lib/corelib/language/tst_language.cpp index 43fbf6dad..c73b26665 100644 --- a/src/lib/corelib/language/tst_language.cpp +++ b/src/lib/corelib/language/tst_language.cpp @@ -432,6 +432,8 @@ void TestLanguage::erroneousFiles_data() "but this is qbs version " QBS_VERSION "."; QTest::newRow("wrongQbsVersionFormat") << "The value '.*' of Project.minimumQbsVersion is not a valid version string."; + QTest::newRow("properties-item-with-invalid-condition") + << "TypeError: Result of expression 'cpp.nonexistingproperty'"; } void TestLanguage::erroneousFiles() |
