aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-12-10 08:29:32 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-12-10 08:29:32 +0000
commitecec3d45ece7f0754f2bdede3aaadb13ab71e3c4 (patch)
treee960f203a64cb46d46983231a29ecb1793b1605f /tests/auto
parentbe3772725cec64e533d35a38376077363af01ede (diff)
parent4fec5c428e580d0f2622bbe878349899e5f93c62 (diff)
Merge "Merge remote-tracking branch 'origin/5.12.0' into 5.12" into refs/staging/5.12
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp9
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 71c4e03812..254a6bc878 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -360,6 +360,7 @@ private slots:
void importLexicalVariables_data();
void importLexicalVariables();
void hugeObject();
+ void templateStringTerminator();
private:
// static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -8858,6 +8859,14 @@ void tst_qqmlecmascript::hugeObject()
QVERIFY(!v.isError());
}
+void tst_qqmlecmascript::templateStringTerminator()
+{
+ QJSEngine engine;
+ const QJSValue value = engine.evaluate("let a = 123; let b = `x${a}\ny^`; b;");
+ QVERIFY(!value.isError());
+ QCOMPARE(value.toString(), QLatin1String("x123\ny^"));
+}
+
QTEST_MAIN(tst_qqmlecmascript)
#include "tst_qqmlecmascript.moc"