Enhance the command-line completion extension to return the names of
[sqlite.git] / ext / session / sessionwor.test
blobd906a92b6211cab5f83aaad295acabd819fa3888
1 # 2017 Jan 31
3 # The author disclaims copyright to this source code.  In place of
4 # a legal notice, here is a blessing:
6 #    May you do good and not evil.
7 #    May you find forgiveness for yourself and forgive others.
8 #    May you share freely, never taking more than you give.
10 #***********************************************************************
12 # The focus of this file is testing the session module. Specifically,
13 # testing support for WITHOUT ROWID tables.
16 if {![info exists testdir]} {
17   set testdir [file join [file dirname [info script]] .. .. test]
18
19 source [file join [file dirname [info script]] session_common.tcl]
20 source $testdir/tester.tcl
21 ifcapable !session {finish_test; return}
23 set testprefix sessionwor
25 proc test_reset {} {
26   catch { db close }
27   catch { db2 close }
28   forcedelete test.db test.db2
29   sqlite3 db test.db
30   sqlite3 db2 test.db2
34 do_execsql_test 1.0 {
35   CREATE TABLE t1(a PRIMARY KEY, b) WITHOUT ROWID;
38 do_iterator_test 1.1 t1 {
39   INSERT INTO t1 VALUES('one', 'two');
40 } {
41   {INSERT t1 0 X. {} {t one t two}}
44 do_iterator_test 1.2 t1 {
45   UPDATE t1 SET b='three'
46 } {
47   {UPDATE t1 0 X. {t one t two} {{} {} t three}}
50 do_iterator_test 1.3 t1 {
51   DELETE FROM t1;
52 } {
53   {DELETE t1 0 X. {t one t three} {}}
56 finish_test