xref: /sqlite-3.40.0/test/format4.test (revision e19d5940)
1# 2005 December 29
2#
3# The author disclaims copyright to this source code.  In place of
4# a legal notice, here is a blessing:
5#
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.
9#
10#***********************************************************************
11# This file implements regression tests for SQLite library.
12#
13# This file implements tests to verify that the new serial_type
14# values of 8 (integer 0) and 9 (integer 1) work correctly.
15#
16
17set testdir [file dirname $argv0]
18source $testdir/tester.tcl
19
20do_test format4-1.1 {
21  execsql {
22    CREATE TABLE t1(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9);
23    INSERT INTO t1 VALUES(0,0,0,0,0,0,0,0,0,0);
24    INSERT INTO t1 SELECT * FROM t1;
25    INSERT INTO t1 SELECT * FROM t1;
26    INSERT INTO t1 SELECT * FROM t1;
27    INSERT INTO t1 SELECT * FROM t1;
28    INSERT INTO t1 SELECT * FROM t1;
29    INSERT INTO t1 SELECT * FROM t1;
30  }
31  file size test.db
32} {2048}
33do_test format4-1.2 {
34  execsql {
35    UPDATE t1 SET x0=1, x1=1, x2=1, x3=1, x4=1, x5=1, x6=1, x7=1, x8=1, x9=1
36  }
37  file size test.db
38} {2048}
39do_test format4-1.3 {
40  execsql {
41    UPDATE t1 SET x0=2, x1=2, x2=2, x3=2, x4=2, x5=2, x6=2, x7=2, x8=2, x9=2
42  }
43  file size test.db
44} {4096}
45
46
47finish_test
48