diff options
author | Liang Qi <[email protected]> | 2015-12-18 19:17:30 +0100 |
---|---|---|
committer | Liang Qi <[email protected]> | 2015-12-18 19:17:30 +0100 |
commit | 9f38956fc9a58a2fdfd83c91d65502964047eda3 (patch) | |
tree | 3156fa78c621e3588b230d8334944d4c9e857d45 /tests/auto/qml/qmlplugindump | |
parent | 57cd6337a87f4a8a77ea7136c60a32d2825426df (diff) | |
parent | 839d2d3e2368bc8e107d22203b0611c852f54319 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
Change-Id: I9588a3e2c7d590e031dd4c66905a79f0d74d3ac8
Diffstat (limited to 'tests/auto/qml/qmlplugindump')
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml b/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml new file mode 100644 index 0000000000..b47d2e98f4 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml @@ -0,0 +1,6 @@ +pragma Singleton +import QtQuick 2.0 + +QtObject { + property int test: 0 +} diff --git a/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir b/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir new file mode 100644 index 0000000000..8df57f6d47 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir @@ -0,0 +1,3 @@ +module tests.dumper.CompositeSingleton +singleton Singleton 1.0 Singleton.qml +depends QtQuick 2.0 diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp index 28d687bd1c..eb05e8cde7 100644 --- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp +++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp @@ -47,6 +47,7 @@ public: private slots: void initTestCase(); void builtins(); + void singleton(); private: QString qmlplugindumpPath; @@ -102,6 +103,19 @@ void tst_qmlplugindump::builtins() QVERIFY(result.contains(QLatin1String("Module {"))); } +void tst_qmlplugindump::singleton() +{ + QProcess dumper; + QStringList args; + args << QLatin1String("tests.dumper.CompositeSingleton") << QLatin1String("1.0") + << QLatin1String("."); + dumper.start(qmlplugindumpPath, args); + dumper.waitForFinished(); + + const QString &result = dumper.readAllStandardOutput(); + QVERIFY(result.contains(QLatin1String("exports: [\"Singleton 1.0\"]"))); +} + QTEST_MAIN(tst_qmlplugindump) #include "tst_qmlplugindump.moc" |