aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-05-02 01:00:50 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-05-02 01:00:50 +0200
commit0d409333d8679c75beeeda2711a9f01b5e708743 (patch)
tree0058d7d3e1f9874893aa367a4ee802940c16549d /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
parent9b6c20cb719542cfcf3e031afd5b2b0b1cd3833e (diff)
parentad6061b265b6a482a6e0e29b20be0c681332abb1 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 393758eee4..72a524ece5 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -368,6 +368,7 @@ private slots:
void saveAccumulatorBeforeToInt32();
void intMinDividedByMinusOne();
void undefinedPropertiesInObjectWrapper();
+ void hugeRegexpQuantifiers();
private:
// static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -8994,6 +8995,16 @@ void tst_qqmlecmascript::undefinedPropertiesInObjectWrapper()
QVERIFY(!object.isNull());
}
+void tst_qqmlecmascript::hugeRegexpQuantifiers()
+{
+ QJSEngine engine;
+ QJSValue value = engine.evaluate("/({3072140529})?{3072140529}/");
+
+ // It's a regular expression, but it won't match anything.
+ // The RegExp compiler also shouldn't crash.
+ QVERIFY(value.isRegExp());
+}
+
QTEST_MAIN(tst_qqmlecmascript)
#include "tst_qqmlecmascript.moc"