/ Check-in [56b66418]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix minor problems in tcl test scripts.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 56b664185e3e56ad22e0c16a5b946fc8204d4d33221b6b4269d6d650dfd9969c
User & Date: dan 2019-04-12 12:10:03
Context
2019-04-12
13:40
Tweaks to wapptest.tcl: Ensure that the "Debug" checkbox is disabled unless the app is in "config" state, and have Debug variants run "test" instead of "fulltest". check-in: dd248c18 user: dan tags: trunk
12:10
Fix minor problems in tcl test scripts. check-in: 56b66418 user: dan tags: trunk
2019-04-11
19:07
Add the test/wapptest.tcl script, an alternative to releasetest.tcl that uses wapp to provide the user-interface. check-in: edd87cd6 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/altertab3.test.

    95     95     BEGIN;
    96     96       ALTER TABLE t3 RENAME TO t4;
    97     97   } {1 {error in trigger tr1: no such table: main.t2}}
    98     98   do_execsql_test 4.1.2 {
    99     99     COMMIT;
   100    100   }
   101    101   do_execsql_test 4.1.3 {
   102         -  SELECT * FROM sqlite_master WHERE type='table' AND name!='t1';
   103         -} {table t3 t3 3 {CREATE TABLE t3(e, f)}}
          102  +  SELECT type, name, tbl_name, sql 
          103  +  FROM sqlite_master WHERE type='table' AND name!='t1';
          104  +} {table t3 t3 {CREATE TABLE t3(e, f)}}
   104    105   
   105    106   
   106    107   do_catchsql_test 4.2.1 {
   107    108     BEGIN;
   108    109       ALTER TABLE t3 RENAME e TO eee;
   109    110   } {1 {error in trigger tr1: no such table: main.t2}}
   110    111   do_execsql_test 4.2.2 {
   111    112     COMMIT;
   112    113   }
   113    114   do_execsql_test 4.2.3 {
   114         -  SELECT * FROM sqlite_master WHERE type='table' AND name!='t1';
   115         -} {table t3 t3 3 {CREATE TABLE t3(e, f)}}
          115  +  SELECT type, name, tbl_name, sql 
          116  +  FROM sqlite_master WHERE type='table' AND name!='t1';
          117  +} {table t3 t3 {CREATE TABLE t3(e, f)}}
   116    118   
   117    119   #-------------------------------------------------------------------------
   118    120   reset_db
   119    121   do_execsql_test 5.0 {
   120    122     CREATE TABLE t1 (
   121    123         c1 integer, c2, PRIMARY KEY(c1 collate rtrim),
   122    124         UNIQUE(c2)

Changes to test/corruptC.test.

    93     93     forcecopy test.bu test.db
    94     94   
    95     95     # insert corrupt byte(s)
    96     96     hexio_write test.db 2053 [format %02x 0x04]
    97     97   
    98     98     sqlite3 db test.db
    99     99     catchsql {PRAGMA integrity_check}
   100         -} {1 {database disk image is malformed}}
          100  +} {0 {{*** in database main ***
          101  +Page 3: free space corruption}}}
   101    102   
   102    103   # test that a corrupt content offset size is handled (seed 5649)
   103    104   #
   104    105   # Update 2016-12-27:  As of check-in [0b86fbca66] "In sqlite3BtreeInsert() when
   105    106   # replacing a re-existing row, try to overwrite the cell directly rather than
   106    107   # deallocate and reallocate the cell" on 2016-12-09, this test case no longer
   107    108   # detects the offset size problem during the UPDATE.  We have to run a subsequent

Changes to test/memdb1.test.

   182    182   } {1 {unknown option: a}}
   183    183   do_test 620 {
   184    184     set rc [catch {db serialize a b} msg]
   185    185     lappend rc $msg
   186    186   } {1 {wrong # args: should be "db serialize ?DATABASE?"}}
   187    187   
   188    188   #-------------------------------------------------------------------------
   189         -reset_db
   190         -do_execsql_test 700 {
   191         -  CREATE TABLE t1(a, b);
   192         -  PRAGMA schema_version = 0;
   193         -}
   194         -do_test 710 {
   195         -  set ser [db serialize main]
   196         -  db close
   197         -  sqlite3 db
   198         -  db deserialize main $ser
   199         -  catchsql {
   200         -    CREATE VIRTUAL TABLE t1 USING rtree(id, a, b, c, d);
          189  +ifcapable vtab {
          190  +  reset_db
          191  +  do_execsql_test 700 {
          192  +    CREATE TABLE t1(a, b);
          193  +    PRAGMA schema_version = 0;
   201    194     }
   202         -} {1 {table t1 already exists}}
          195  +  do_test 710 {
          196  +    set ser [db serialize main]
          197  +    db close
          198  +    sqlite3 db
          199  +    db deserialize main $ser
          200  +    catchsql {
          201  +      CREATE VIRTUAL TABLE t1 USING rtree(id, a, b, c, d);
          202  +    }
          203  +  } {1 {table t1 already exists}}
          204  +}
   203    205   
   204    206   finish_test

Changes to test/pragma4.test.

   170    170   }
   171    171   do_test 4.3.4 { 
   172    172     sqlite3 db3 test.db
   173    173     sqlite3 db2 test.db2
   174    174     execsql { DROP INDEX i1 } db3
   175    175     execsql { DROP INDEX i2 } db2
   176    176   } {}
          177  +if {[permutation]=="prepare"} { catchsql { SELECT * FROM sqlite_master } }
   177    178   ifcapable vtab {
   178    179     do_execsql_test 4.3.5 { SELECT * FROM pragma_index_info('i1') } 
   179    180     do_execsql_test 4.3.6 { SELECT * FROM pragma_index_info('i2') } 
   180    181   }
   181    182   
   182    183   execsql {SELECT * FROM main.sqlite_master, aux.sqlite_master}
   183    184   do_execsql_test 4.4.0 {
................................................................................
   188    189     do_execsql_test 4.4.1 { SELECT * FROM pragma_index_list('t1') } {0 i1 0 c 0}
   189    190     do_execsql_test 4.4.2 { SELECT * FROM pragma_index_list('t2') } {0 i2 0 c 0}
   190    191   }
   191    192   do_test 4.4.3 { 
   192    193     execsql { DROP INDEX i1 } db3
   193    194     execsql { DROP INDEX i2 } db2
   194    195   } {}
          196  +if {[permutation]=="prepare"} { 
          197  +  catchsql { SELECT * FROM sqlite_master, aux.sqlite_master }
          198  +}
   195    199   ifcapable vtab {
   196    200     do_execsql_test 4.4.5 { SELECT * FROM pragma_index_list('t1') } {}
   197    201     do_execsql_test 4.4.6 { SELECT * FROM pragma_index_list('t2') } {}
   198    202   }
   199    203   execsql {SELECT * FROM main.sqlite_master, aux.sqlite_master}
   200    204   
   201    205   do_execsql_test 4.5.0 {
................................................................................
   212    216       0 0 t2 r d {NO ACTION} {NO ACTION} NONE
   213    217     }
   214    218   }
   215    219   do_test 4.5.3 { 
   216    220     execsql { DROP TABLE c1 } db3
   217    221     execsql { DROP TABLE c2 } db2
   218    222   } {}
          223  +if {[permutation]=="prepare"} { 
          224  +  catchsql { SELECT * FROM sqlite_master, aux.sqlite_master }
          225  +}
   219    226   ifcapable vtab {
   220    227     do_execsql_test 4.5.4 { SELECT * FROM pragma_foreign_key_list('c1') }
   221    228     do_execsql_test 4.5.5 { SELECT * FROM pragma_foreign_key_list('c2') } 
   222    229   }
   223    230   execsql {SELECT * FROM main.sqlite_master, aux.sqlite_master}
   224    231   
   225    232   do_execsql_test 4.6.0 {