diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js')
-rw-r--r-- | tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js b/tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js new file mode 100644 index 0000000..10a23f6 --- /dev/null +++ b/tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js @@ -0,0 +1,20 @@ +function test() { + var db = openDatabaseSync("QmlTestDB-error-a", "1.0", "Test database from Qt autotests", 1000000); + var r="transaction_not_finished"; + + try { + db.transaction( + function(tx) { + var rs = tx.executeSql('SELECT * FROM NotExists'); + r = "SHOULD NOT SUCCEED"; + } + ); + } catch (err) { + if (err.message == "no such table: NotExists Unable to execute statement") + r = "passed"; + else + r = "WRONG ERROR="+err.message; + } + + return r; +} |