diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-10-28 07:45:31 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-10-28 07:45:31 (GMT) |
commit | 5746e2ec47f1186e928830b58833756ac25156f4 (patch) | |
tree | 513a2a334c18ac5588c4110bcffca8e3d1a467a9 /tests/auto/declarative/sql | |
parent | 1f68fba91cf60103dd118dbd0d78342526bac593 (diff) | |
download | Qt-5746e2ec47f1186e928830b58833756ac25156f4.zip Qt-5746e2ec47f1186e928830b58833756ac25156f4.tar.gz Qt-5746e2ec47f1186e928830b58833756ac25156f4.tar.bz2 |
missing commit
Diffstat (limited to 'tests/auto/declarative/sql')
-rw-r--r-- | tests/auto/declarative/sql/data/4-iteration-index.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/declarative/sql/data/4-iteration-index.js b/tests/auto/declarative/sql/data/4-iteration-index.js new file mode 100644 index 0000000..298737d --- /dev/null +++ b/tests/auto/declarative/sql/data/4-iteration-index.js @@ -0,0 +1,27 @@ +var db = openDatabase("QmlTestDB", "", "Test database from Qt autotests", 1000000); +var r=0; + +db.transaction( + function(tx) { + tx.executeSql('SELECT * FROM Greeting', [], + function(tx, rs) { + var r1="" + for(var i = 0; i < rs.rows.length; i++) { + r1 += rs.rows[i].salutation + ", " + rs.rows[i].salutee + ";" + } + if (r1 != "hello, world;hello, world;hello, world;hello, world;") + r = "SELECTED DATA WRONG: "+r1; + }, + function(tx, error) { if (r==0) r="SELECT FAILED: "+error.message } + ); + }, + function(tx, error) { if (r==0) r="TRANSACTION FAILED: "+error.message }, + function(tx, result) { if (r==0) r="passed" } +); + + +function test() +{ + if (r == 0) r = "transaction_not_finished"; + return r; +} |