summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 87d73a0..2791722c 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -131,6 +131,7 @@ private slots:
void bug1();
void dynamicCreationCrash();
+ void regExpBug();
void callQtInvokables();
private:
@@ -1241,6 +1242,15 @@ void tst_qdeclarativeecmascript::dynamicCreationCrash()
QVERIFY(created == 0);
}
+//QTBUG-9367
+void tst_qdeclarativeecmascript::regExpBug()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("regExp.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->regExp().pattern(), QLatin1String("[a-zA-z]"));
+}
+
void tst_qdeclarativeecmascript::callQtInvokables()
{
MyInvokableObject o;