diff options
Diffstat (limited to 'tests/auto/qscriptengine/tst_qscriptengine.cpp')
-rw-r--r-- | tests/auto/qscriptengine/tst_qscriptengine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 82f4d16..4b6b0b7 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -250,6 +250,7 @@ private slots: void dateRoundtripQtJSQt(); void dateConversionJSQt(); void dateConversionQtJS(); + void stringListFromArrayWithEmptyElement(); }; tst_QScriptEngine::tst_QScriptEngine() @@ -6141,5 +6142,13 @@ void tst_QScriptEngine::scriptValueFromQMetaObject() } } +// QTBUG-21896 +void tst_QScriptEngine::stringListFromArrayWithEmptyElement() +{ + QScriptEngine eng; + QCOMPARE(qscriptvalue_cast<QStringList>(eng.evaluate("[,'hello']")), + QStringList() << "" << "hello"); +} + QTEST_MAIN(tst_QScriptEngine) #include "tst_qscriptengine.moc" |