diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-01 11:01:50 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-01 15:21:27 +0100 |
commit | bf38043b6107cb10bca4be78ecc8bbc20338a61b (patch) | |
tree | 1da9dda810c3551579c6ef6a1615ee42f3c0874c /tests/auto/qml/qmlbasicapp/tst_qmlbasicapp.cpp | |
parent | 9a30895128728f9f1720ab7cb53e90e5e823a568 (diff) | |
download | qtdeclarative-bf38043b6107cb10bca4be78ecc8bbc20338a61b.tar.gz |
CMake: Include upper case .js and .mjs files in qmldir
You can use them as singletons.
Pick-to: 6.2 6.3
Fixes: QTBUG-100326
Change-Id: I8e07600657bd43ba8376279ffe39cfa5d3213c38
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlbasicapp/tst_qmlbasicapp.cpp')
-rw-r--r-- | tests/auto/qml/qmlbasicapp/tst_qmlbasicapp.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlbasicapp/tst_qmlbasicapp.cpp b/tests/auto/qml/qmlbasicapp/tst_qmlbasicapp.cpp index 4d62fc46b6..2fd7ef634b 100644 --- a/tests/auto/qml/qmlbasicapp/tst_qmlbasicapp.cpp +++ b/tests/auto/qml/qmlbasicapp/tst_qmlbasicapp.cpp @@ -61,6 +61,9 @@ void tst_basicapp::loadComponent() QObject *more = qvariant_cast<QObject*>(o->property("more")); QVERIFY(more); QCOMPARE(more->objectName(), QStringLiteral("ui.qml")); + + QCOMPARE(o->property("fromESModule").toString(), QStringLiteral("eee")); + QCOMPARE(o->property("fromJSFile").toString(), QStringLiteral("bar")); } void tst_basicapp::resourceFiles() @@ -133,7 +136,10 @@ void tst_basicapp::qmldirContents() QVERIFY(qmldir.open(QIODevice::ReadOnly)); const QByteArray contents = qmldir.readAll(); QVERIFY(contents.contains("More 1.0 More.ui.qml")); - QVERIFY(!contents.contains("Less.js")); + QVERIFY(contents.contains("Less.js")); + QVERIFY(contents.contains("ESModule.mjs")); + QVERIFY(!contents.contains("lowerCase.js")); + QVERIFY(!contents.contains("lowerCaseModule.mjs")); } } |