diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-05-18 06:09:53 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-05-18 06:11:34 (GMT) |
commit | ffccebed9af217cc5bf2f3e4eba00df754eb7ac9 (patch) | |
tree | 79fb7c62e5e695d0d3c1a65932a4b91187e7c7f1 /tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | |
parent | 711a9a8294d354c1a745b0f6a550672403b7e6fd (diff) | |
download | Qt-ffccebed9af217cc5bf2f3e4eba00df754eb7ac9.zip Qt-ffccebed9af217cc5bf2f3e4eba00df754eb7ac9.tar.gz Qt-ffccebed9af217cc5bf2f3e4eba00df754eb7ac9.tar.bz2 |
Make Qt.include() work for js files that have '.pragma library'
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 0710e15..9a88237 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -2424,6 +2424,17 @@ void tst_qdeclarativeecmascript::include() delete o; } + // Including file with ".pragma library" + { + QDeclarativeComponent component(&engine, TEST_FILE("include_pragma.qml")); + qDebug() << "errors:" << component.errorsString(); + QObject *o = component.create(); + QVERIFY(o != 0); + QCOMPARE(o->property("test1").toInt(), 100); + + delete o; + } + // Remote - success { TestHTTPServer server(8111); |