diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-04 01:00:22 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-10-04 11:29:16 +0200 |
commit | 9c7121df1579d38c7f4136da6146d7acae8fedcc (patch) | |
tree | 0917e293d83b4c1ce635cf65185e6ad98fe66519 /tests/auto/qml/qmlcachegen | |
parent | f529d38103a6c1c5c7b76ad92e0e5641719e369e (diff) | |
parent | c211b93bb87308601fe1c808634eb648d1949c40 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
src/imports/qtquick2/plugins.qmltypes
src/quick/items/qquickitemsmodule.cpp
Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
Diffstat (limited to 'tests/auto/qml/qmlcachegen')
-rw-r--r-- | tests/auto/qml/qmlcachegen/data/module.mjs | 6 | ||||
-rw-r--r-- | tests/auto/qml/qmlcachegen/data/utils.mjs | 4 | ||||
-rw-r--r-- | tests/auto/qml/qmlcachegen/qmlcachegen.pro | 4 | ||||
-rw-r--r-- | tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp | 9 |
4 files changed, 22 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlcachegen/data/module.mjs b/tests/auto/qml/qmlcachegen/data/module.mjs new file mode 100644 index 0000000000..6838766329 --- /dev/null +++ b/tests/auto/qml/qmlcachegen/data/module.mjs @@ -0,0 +1,6 @@ + +import { helper } from "utils.mjs" + +export function entry() { + return helper() +} diff --git a/tests/auto/qml/qmlcachegen/data/utils.mjs b/tests/auto/qml/qmlcachegen/data/utils.mjs new file mode 100644 index 0000000000..25a1f38709 --- /dev/null +++ b/tests/auto/qml/qmlcachegen/data/utils.mjs @@ -0,0 +1,4 @@ + +export function helper() { + return "ok" +} diff --git a/tests/auto/qml/qmlcachegen/qmlcachegen.pro b/tests/auto/qml/qmlcachegen/qmlcachegen.pro index 18d3abd6bc..1a334b68ce 100644 --- a/tests/auto/qml/qmlcachegen/qmlcachegen.pro +++ b/tests/auto/qml/qmlcachegen/qmlcachegen.pro @@ -15,7 +15,9 @@ RESOURCES += \ data/Enums.qml \ data/componentInItem.qml \ data/jsmoduleimport.qml \ - data/script.mjs + data/script.mjs \ + data/module.mjs \ + data/utils.mjs workerscripts_test.files = \ data/worker.js \ diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp index 7441aed11f..5d87c319f3 100644 --- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp +++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp @@ -65,6 +65,7 @@ private slots: void qrcScriptImport(); void fsScriptImport(); void moduleScriptImport(); + void esModulesViaQJSEngine(); void enums(); @@ -601,6 +602,14 @@ void tst_qmlcachegen::moduleScriptImport() } } +void tst_qmlcachegen::esModulesViaQJSEngine() +{ + QJSEngine engine; + QJSValue module = engine.importModule(":/data/module.mjs"); + QJSValue result = module.property("entry").call(); + QCOMPARE(result.toString(), "ok"); +} + void tst_qmlcachegen::enums() { QQmlEngine engine; |