aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlsqldatabase/data/reopen2.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlsqldatabase/data/reopen2.js')
-rw-r--r--tests/auto/qml/qqmlsqldatabase/data/reopen2.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlsqldatabase/data/reopen2.js b/tests/auto/qml/qqmlsqldatabase/data/reopen2.js
new file mode 100644
index 0000000000..12c6135145
--- /dev/null
+++ b/tests/auto/qml/qqmlsqldatabase/data/reopen2.js
@@ -0,0 +1,18 @@
+.import QtQuick.LocalStorage 2.0 as Sql
+
+function test() {
+ var r="transaction_not_finished";
+ var db = Sql.openDatabaseSync("QmlTestDB-reopen", "1.0", "Test database from Qt autotests", 1000000);
+
+ db.transaction(
+ function(tx) {
+ var rs = tx.executeSql('SELECT * FROM Greeting');
+ if (rs.rows.item(0).salutation == 'hello')
+ r = "passed";
+ else
+ r = "FAILED";
+ }
+ );
+
+ return r;
+}