Same fix as r45172 for classes/iconimage:
[AROS-Contrib.git] / sqlite3 / test / btree7.test
blobeaf37138e11b1d6e65c71ec7b3bce65e3dc8f3aa
1 # 2004 Jun 4    
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 #***********************************************************************
11 # This file implements regression tests for SQLite library.  The
12 # focus of this script is btree database backend.
14 # $Id: btree7.test,v 1.2 2004/11/04 14:47:13 drh Exp $
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
20 # Stress the balance routine by trying to create situations where
21 # 3 neighboring nodes split into 5.
23 set bigdata _123456789    ;#  10
24 append bigdata $bigdata   ;#  20
25 append bigdata $bigdata   ;#  40
26 append bigdata $bigdata   ;#  80
27 append bigdata $bigdata   ;# 160
28 append bigdata $bigdata   ;# 320
29 append bigdata $bigdata   ;# 640
30 set data450 [string range $bigdata 0 449]
31 do_test btree7-1.1 {
32   execsql "
33     CREATE TABLE t1(x INTEGER PRIMARY KEY, y TEXT);
34     INSERT INTO t1 VALUES(1, '$bigdata');
35     INSERT INTO t1 VALUES(2, '$bigdata');
36     INSERT INTO t1 VALUES(3, '$data450');
37     INSERT INTO t1 VALUES(5, '$data450');
38     INSERT INTO t1 VALUES(8, '$bigdata');
39     INSERT INTO t1 VALUES(9, '$bigdata');
40   "
41 } {}
42 integrity_check btree7-1.2
43 do_test btree7-1.3 {
44   execsql "
45     INSERT INTO t1 VALUES(4, '$bigdata');
46   "
47 } {}
48 integrity_check btree7-1.4
50 finish_test