From 487e15dc239ccdb3344d1c99ce120e872bab4a74 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 20 Sep 2012 18:34:38 -0400 Subject: Imported Upstream version 2.0.6 --- test/capi3c.test | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'test/capi3c.test') diff --git a/test/capi3c.test b/test/capi3c.test index c1d5510..4092091 100644 --- a/test/capi3c.test +++ b/test/capi3c.test @@ -849,18 +849,25 @@ do_test capi3c-11.9.2 { catchsql { ROLLBACK; } -} {1 {cannot rollback transaction - SQL statements in progress}} +} {0 {}} do_test capi3c-11.9.3 { sqlite3_get_autocommit $DB -} 0 +} 1 do_test capi3c-11.10 { sqlite3_step $STMT -} {SQLITE_ROW} +} {SQLITE_ABORT} +ifcapable !autoreset { + # If SQLITE_OMIT_AUTORESET is defined, then the statement must be + # reset() before it can be passed to step() again. + do_test capi3-11.11a { sqlite3_step $STMT } {SQLITE_MISUSE} + do_test capi3-11.11b { sqlite3_reset $STMT } {SQLITE_ABORT} +} do_test capi3c-11.11 { sqlite3_step $STMT } {SQLITE_ROW} do_test capi3c-11.12 { sqlite3_step $STMT + sqlite3_step $STMT } {SQLITE_DONE} do_test capi3c-11.13 { sqlite3_finalize $STMT @@ -869,15 +876,15 @@ do_test capi3c-11.14 { execsql { SELECT a FROM t2; } -} {1 2 3} +} {1 2} do_test capi3c-11.14.1 { sqlite3_get_autocommit $DB -} 0 +} 1 do_test capi3c-11.15 { catchsql { ROLLBACK; } -} {0 {}} +} {1 {cannot rollback - no transaction is active}} do_test capi3c-11.15.1 { sqlite3_get_autocommit $DB } 1 -- cgit v1.2.3