diff options
Diffstat (limited to 'tests/auto/qml/qjsengine/tst_qjsengine.cpp')
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 43f43764d5..3ceeb97718 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -189,6 +189,8 @@ private slots: void v4FunctionWithoutQML(); + void withNoContext(); + signals: void testSignal(); }; @@ -3985,6 +3987,13 @@ void tst_QJSEngine::v4FunctionWithoutQML() QVERIFY(obj.called); } +void tst_QJSEngine::withNoContext() +{ + // Don't crash (QTBUG-53794) + QJSEngine engine; + engine.evaluate("with (noContext) true"); +} + QTEST_MAIN(tst_QJSEngine) #include "tst_qjsengine.moc" |