diff options
author | Richard Weickelt <richard@weickelt.de> | 2020-05-08 13:23:53 +0200 |
---|---|---|
committer | Richard Weickelt <richard@weickelt.de> | 2020-05-11 08:39:38 +0000 |
commit | 0bbc9cddde0a5fdb54412d12397fd96d560b83d0 (patch) | |
tree | 2348558ac40a21f247d7dcaca3dd70b03ef5adc8 /tests/auto/language/tst_language.cpp | |
parent | a3c97374d0e06e0e2a23b22c10450ede48bcb478 (diff) | |
download | qbs-0bbc9cddde0a5fdb54412d12397fd96d560b83d0.tar.gz |
Add testcase for building projects with internal profiles
When a project contains a Profile item, it should be possible to use
this profile for all products without explicitly selecting it in the
product items.
Task-number: QTCREATORBUG-23985
Change-Id: Ifba53d26dc302cedd4be7a906ef2fd6fb3e6eb9d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/language/tst_language.cpp')
-rw-r--r-- | tests/auto/language/tst_language.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/language/tst_language.cpp b/tests/auto/language/tst_language.cpp index 25e549d18..20d607320 100644 --- a/tests/auto/language/tst_language.cpp +++ b/tests/auto/language/tst_language.cpp @@ -3024,6 +3024,21 @@ void TestLanguage::fileTags() QCOMPARE(fileTags, expectedFileTags); } +void TestLanguage::useInternalProfile() +{ + const QString profile(QStringLiteral("theprofile")); + SetupProjectParameters params = defaultParameters; + params.setProjectFilePath(testProject("use-internal-profile.qbs")); + params.setTopLevelProfile(profile); + TopLevelProjectConstPtr project = loader->loadProject(params); + QVERIFY(!!project); + QCOMPARE(project->profile(), profile); + QCOMPARE(project->products.size(), size_t(1)); + const ResolvedProductConstPtr product = project->products[0]; + QCOMPARE(product->profile(), profile); + QCOMPARE(product->moduleProperties->moduleProperty("dummy", "defines").toString(), profile); +} + void TestLanguage::wildcards_data() { QTest::addColumn<bool>("useGroup"); |