author | sl@SLION-WIN7.fritz.box |
Fri, 15 Jun 2012 03:10:57 +0200 | |
changeset 0 | bde4ae8d615e |
permissions | -rw-r--r-- |
sl@0 | 1 |
# 2005 September 19 |
sl@0 | 2 |
# |
sl@0 | 3 |
# The author disclaims copyright to this source code. In place of |
sl@0 | 4 |
# a legal notice, here is a blessing: |
sl@0 | 5 |
# |
sl@0 | 6 |
# May you do good and not evil. |
sl@0 | 7 |
# May you find forgiveness for yourself and forgive others. |
sl@0 | 8 |
# May you share freely, never taking more than you give. |
sl@0 | 9 |
# |
sl@0 | 10 |
#*********************************************************************** |
sl@0 | 11 |
# This file implements regression tests for SQLite library. |
sl@0 | 12 |
# |
sl@0 | 13 |
# This file implements tests to verify that ticket #1512 is |
sl@0 | 14 |
# fixed. |
sl@0 | 15 |
# |
sl@0 | 16 |
|
sl@0 | 17 |
set testdir [file dirname $argv0] |
sl@0 | 18 |
source $testdir/tester.tcl |
sl@0 | 19 |
|
sl@0 | 20 |
ifcapable {!vacuum || !autovacuum} { |
sl@0 | 21 |
finish_test |
sl@0 | 22 |
return |
sl@0 | 23 |
} |
sl@0 | 24 |
if {[db one {PRAGMA auto_vacuum}]} { |
sl@0 | 25 |
finish_test |
sl@0 | 26 |
return |
sl@0 | 27 |
} |
sl@0 | 28 |
|
sl@0 | 29 |
do_test tkt1512-1.1 { |
sl@0 | 30 |
execsql { |
sl@0 | 31 |
CREATE TABLE t1(a,b); |
sl@0 | 32 |
INSERT INTO t1 VALUES(1,2); |
sl@0 | 33 |
INSERT INTO t1 VALUES(3,4); |
sl@0 | 34 |
SELECT * FROM t1 |
sl@0 | 35 |
} |
sl@0 | 36 |
} {1 2 3 4} |
sl@0 | 37 |
do_test tkt1512-1.2 { |
sl@0 | 38 |
file size test.db |
sl@0 | 39 |
} {2048} |
sl@0 | 40 |
do_test tkt1512-1.3 { |
sl@0 | 41 |
execsql { |
sl@0 | 42 |
DROP TABLE t1; |
sl@0 | 43 |
} |
sl@0 | 44 |
file size test.db |
sl@0 | 45 |
} {2048} |
sl@0 | 46 |
do_test tkt1512-1.4 { |
sl@0 | 47 |
execsql { |
sl@0 | 48 |
VACUUM; |
sl@0 | 49 |
} |
sl@0 | 50 |
file size test.db |
sl@0 | 51 |
} {1024} |
sl@0 | 52 |
|
sl@0 | 53 |
|
sl@0 | 54 |
finish_test |