diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-06-02 16:40:24 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-06-02 16:40:24 +0300 |
commit | 3fdbd475202703530ca4b8f7f2a0e731d5f87f8b (patch) | |
tree | 516a9c48a004fc471fe8bc5dedd4efa72550cab9 /tests | |
parent | 35f79da9cb99c7c0456f002829dc0fdfe55b4f8d (diff) | |
parent | 45e77c3a1eb790d89f2ded5b7fbe556ed4b5271c (diff) |
Merge remote-tracking branch 'origin/4.1'
Change-Id: I86049138466399411ba36791330f4a94faad8c52
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/installer/scriptengine/tst_scriptengine.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/installer/scriptengine/tst_scriptengine.cpp b/tests/auto/installer/scriptengine/tst_scriptengine.cpp index b7c602e26..105bcf5d7 100644 --- a/tests/auto/installer/scriptengine/tst_scriptengine.cpp +++ b/tests/auto/installer/scriptengine/tst_scriptengine.cpp @@ -349,6 +349,21 @@ private slots: } } + void testComponentsWithRegexp() + { + const QString script = QString::fromLatin1("var components = installer.components(\"component.test.addOperation\");" + "\n" + "for (i = 0; i < components.length; i++)" + "print(components[i].name);"); + + setExpectedScriptOutput("component.test.addOperation"); + const QJSValue value = m_scriptEngine->evaluate(script); + if (value.isError()) { + QFAIL(qPrintable(QString::fromLatin1("ScriptEngine error:\n %1").arg( + value.toString()))); + } + } + void testFindFiles() { const QString expectedOutput = QString::fromLatin1("Found file %1/tst_scriptengine.moc").arg(m_applicatonDirPath); |