diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 788ecce1c5..aaaaf09925 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -361,6 +361,7 @@ private slots: void importLexicalVariables(); void hugeObject(); void templateStringTerminator(); + void arrayAndException(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -8869,6 +8870,14 @@ void tst_qqmlecmascript::templateStringTerminator() QCOMPARE(value.toString(), QLatin1String("x123\ny^")); } +void tst_qqmlecmascript::arrayAndException() +{ + QJSEngine engine; + const QJSValue value = engine.evaluate("[...[],[,,$]]"); + // Should not crash + QVERIFY(value.isError()); +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" |