diff options
Diffstat (limited to 'test')
40 files changed, 194 insertions, 194 deletions
diff --git a/test/attach.test b/test/attach.test index 1c165cf9c..6915ef177 100644 --- a/test/attach.test +++ b/test/attach.test @@ -12,7 +12,7 @@ # focus of this script is testing the ATTACH and DETACH commands # and related functionality. # -# $Id: attach.test,v 1.23 2004/06/09 00:48:15 drh Exp $ +# $Id: attach.test,v 1.24 2004/06/19 00:16:31 drh Exp $ # set testdir [file dirname $argv0] @@ -33,7 +33,7 @@ do_test attach-1.1 { } } {1 2 3 4} do_test attach-1.2 { - sqlite db2 test2.db + sqlite3 db2 test2.db execsql { CREATE TABLE t2(x,y); INSERT INTO t2 VALUES(1,'x'); @@ -286,7 +286,7 @@ do_test attach-2.15 { } {table t2 t2 table tx tx trigger r1 t2 index i2 t2} do_test attach-2.16 { db close - sqlite db test.db + sqlite3 db test.db execsql { ATTACH 'test2.db' AS db2; SELECT type, name, tbl_name FROM db2.sqlite_master; @@ -296,8 +296,8 @@ do_test attach-2.16 { do_test attach-3.1 { db close db2 close - sqlite db test.db - sqlite db2 test2.db + sqlite3 db test.db + sqlite3 db2 test2.db execsql { SELECT * FROM t1 } @@ -401,7 +401,7 @@ do_test attach-3.15 { do_test attach-4.1 { execsql {DETACH db2} db2 close - sqlite db2 test2.db + sqlite3 db2 test2.db execsql { CREATE TABLE t3(x,y); CREATE UNIQUE INDEX t3i1 ON t3(x); @@ -510,10 +510,10 @@ do_test attach-4.13 { # do_test attach-5.1 { db close - sqlite db test.db + sqlite3 db test.db db2 close file delete -force test2.db - sqlite db2 test2.db + sqlite3 db2 test2.db catchsql { ATTACH DATABASE 'test.db' AS orig; CREATE TRIGGER r1 AFTER INSERT ON orig.t1 BEGIN; @@ -598,7 +598,7 @@ do_test attach-6.1 { } {0 {}} if {$tcl_platform(platform)=="unix"} { do_test attach-6.2 { - sqlite dbx cannot-read + sqlite3 dbx cannot-read dbx eval {CREATE TABLE t1(a,b,c)} dbx close file attributes cannot-read -permission 0000 diff --git a/test/attach2.test b/test/attach2.test index 9b5ffb8aa..4fe0a6ba2 100644 --- a/test/attach2.test +++ b/test/attach2.test @@ -12,7 +12,7 @@ # focus of this script is testing the ATTACH and DETACH commands # and related functionality. # -# $Id: attach2.test,v 1.18 2004/06/14 09:41:18 danielk1977 Exp $ +# $Id: attach2.test,v 1.19 2004/06/19 00:16:31 drh Exp $ # set testdir [file dirname $argv0] @@ -31,7 +31,7 @@ do_test attach2-1.1 { } file delete -force test2.db file delete -force test2.db-journal - sqlite db2 test2.db + sqlite3 db2 test2.db db2 eval { CREATE TABLE t1(a,b); CREATE INDEX x1 ON t1(a); @@ -129,7 +129,7 @@ do_test attach2-2.12 { # do_test attach2-3.1 { db close - set DB [sqlite db test.db] + set DB [sqlite3 db test.db] set rc [catch {sqlite3_prepare $DB "ATTACH 'test2.db' AS t2" -1 TAIL} VM] if {$rc} {lappend rc $VM} sqlite3_finalize $VM @@ -159,8 +159,8 @@ set sqlite_os_trace 0 # Tests attach2-4.* test that read-locks work correctly with attached # databases. do_test attach2-4.1 { - sqlite db test.db - sqlite db2 test.db + sqlite3 db test.db + sqlite3 db2 test.db execsql {ATTACH 'test2.db' as file2} execsql {ATTACH 'test2.db' as file2} db2 } {} @@ -311,7 +311,7 @@ file delete -force test2.db # doesn't really prove too much. foreach f [glob test.db*] {file delete -force $f} do_test attach2-5.1 { - sqlite db test.db + sqlite3 db test.db execsql { ATTACH 'test.db2' AS aux; } diff --git a/test/attach3.test b/test/attach3.test index f6d9a536b..0a78638ca 100644 --- a/test/attach3.test +++ b/test/attach3.test @@ -12,7 +12,7 @@ # focus of this script is testing the ATTACH and DETACH commands # and schema changes to attached databases. # -# $Id: attach3.test,v 1.6 2004/06/07 07:52:19 danielk1977 Exp $ +# $Id: attach3.test,v 1.7 2004/06/19 00:16:31 drh Exp $ # @@ -27,7 +27,7 @@ execsql { # Create tables t1 and t2 in database file test2.db file delete -force test2.db -sqlite db2 test2.db +sqlite3 db2 test2.db execsql { CREATE TABLE t1(a, b); CREATE TABLE t2(c, d); diff --git a/test/auth.test b/test/auth.test index 2b06b7e16..1a1bffc15 100644 --- a/test/auth.test +++ b/test/auth.test @@ -12,7 +12,7 @@ # focus of this script is testing the ATTACH and DETACH commands # and related functionality. # -# $Id: auth.test,v 1.14 2004/06/14 11:54:18 danielk1977 Exp $ +# $Id: auth.test,v 1.15 2004/06/19 00:16:31 drh Exp $ # set testdir [file dirname $argv0] @@ -23,7 +23,7 @@ source $testdir/tester.tcl do_test auth-1.1.1 { db close - set ::DB [sqlite db test.db] + set ::DB [sqlite3 db test.db] proc auth {code arg1 arg2 arg3 arg4} { if {$code=="SQLITE_INSERT" && $arg1=="sqlite_master"} { return SQLITE_DENY diff --git a/test/bigfile.test b/test/bigfile.test index 1f17af9c6..59e3874ef 100644 --- a/test/bigfile.test +++ b/test/bigfile.test @@ -12,7 +12,7 @@ # focus of this script testing the ability of SQLite to handle database # files larger than 4GB. # -# $Id: bigfile.test,v 1.4 2004/06/13 23:07:04 drh Exp $ +# $Id: bigfile.test,v 1.5 2004/06/19 00:16:31 drh Exp $ # set testdir [file dirname $argv0] @@ -61,7 +61,7 @@ if {[catch {fake_big_file 4096 test.db}]} { } do_test bigfile-1.2 { - sqlite db test.db + sqlite3 db test.db execsql { SELECT md5sum(x) FROM t1; } @@ -83,7 +83,7 @@ do_test bigfile-1.3 { } $::MAGIC_SUM do_test bigfile-1.4 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT md5sum(x) FROM t1; } @@ -102,7 +102,7 @@ if {[catch {fake_big_file 8192 test.db}]} { } do_test bigfile-1.6 { - sqlite db test.db + sqlite3 db test.db execsql { SELECT md5sum(x) FROM t1; } @@ -115,7 +115,7 @@ do_test bigfile-1.7 { } $::MAGIC_SUM do_test bigfile-1.8 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT md5sum(x) FROM t1; } @@ -139,7 +139,7 @@ if {[catch {fake_big_file 16384 test.db}]} { } do_test bigfile-1.11 { - sqlite db test.db + sqlite3 db test.db execsql { SELECT md5sum(x) FROM t1; } @@ -152,7 +152,7 @@ do_test bigfile-1.12 { } $::MAGIC_SUM do_test bigfile-1.13 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT md5sum(x) FROM t1; } diff --git a/test/bind.test b/test/bind.test index 0b7eae63f..118232765 100644 --- a/test/bind.test +++ b/test/bind.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the sqlite_bind API. # -# $Id: bind.test,v 1.11 2004/05/27 09:28:44 danielk1977 Exp $ +# $Id: bind.test,v 1.12 2004/06/19 00:16:31 drh Exp $ # set testdir [file dirname $argv0] @@ -36,7 +36,7 @@ proc sqlite_step {stmt N VALS COLS} { do_test bind-1.1 { db close - set DB [sqlite db test.db] + set DB [sqlite3 db test.db] execsql {CREATE TABLE t1(a,b,c)} set VM [sqlite3_prepare $DB {INSERT INTO t1 VALUES(?,?,?)} -1 TAIL] set TAIL diff --git a/test/blob.test b/test/blob.test index 5eb876146..93009f75d 100644 --- a/test/blob.test +++ b/test/blob.test @@ -10,7 +10,7 @@ #*********************************************************************** # This file implements regression tests for SQLite library. # -# $Id: blob.test,v 1.1 2004/05/27 13:55:27 danielk1977 Exp $ +# $Id: blob.test,v 1.2 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -99,7 +99,7 @@ do_test blob-2.4 { # Try to bind a blob value to a prepared statement. do_test blob-3.0 { - set DB [sqlite db2 test.db] + set DB [sqlite3 db2 test.db] set STMT [sqlite3_prepare $DB "DELETE FROM t1 WHERE a = ?" -1 DUMMY] sqlite3_bind_blob $STMT 1 "\x12\x34\x56" 3 sqlite3_step $STMT diff --git a/test/capi2.test b/test/capi2.test index 68745af7e..4f4017446 100644 --- a/test/capi2.test +++ b/test/capi2.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the callback-free C/C++ API. # -# $Id: capi2.test,v 1.13 2004/06/15 02:44:20 danielk1977 Exp $ +# $Id: capi2.test,v 1.14 2004/06/19 00:16:31 drh Exp $ # set testdir [file dirname $argv0] @@ -73,7 +73,7 @@ proc get_column_names {STMT} { # do_test capi2-1.1 { db close - set DB [sqlite db test.db] + set DB [sqlite3 db test.db] execsql {CREATE TABLE t1(a,b,c)} set VM [sqlite3_prepare $DB {SELECT name, rowid FROM sqlite_master} -1 TAIL] set TAIL @@ -410,7 +410,7 @@ do_test capi2-6.1 { COMMIT; } set VM1 [sqlite3_prepare $DB {SELECT * FROM t3} -1 TAIL] - sqlite db2 test.db + sqlite3 db2 test.db execsql {BEGIN} db2 } {} # Update for v3: BEGIN doesn't write-lock the database. It is quite diff --git a/test/capi3.test b/test/capi3.test index c8a116a7b..166f9371c 100644 --- a/test/capi3.test +++ b/test/capi3.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the callback-free C/C++ API. # -# $Id: capi3.test,v 1.10 2004/05/28 13:13:04 danielk1977 Exp $ +# $Id: capi3.test,v 1.11 2004/06/19 00:16:31 drh Exp $ # set testdir [file dirname $argv0] @@ -51,7 +51,7 @@ proc utf8 {str} { # db close -set DB [sqlite db test.db] +set DB [sqlite3 db test.db] do_test capi3-1.1 { set STMT [sqlite3_prepare $DB {SELECT name FROM sqlite_master} -1 TAIL] diff --git a/test/collate3.test b/test/collate3.test index 70dc7f47f..69ffb6cbe 100644 --- a/test/collate3.test +++ b/test/collate3.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is page cache subsystem. # -# $Id: collate3.test,v 1.2 2004/06/11 10:51:41 danielk1977 Exp $ +# $Id: collate3.test,v 1.3 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -76,7 +76,7 @@ do_test collate3-2.0 { CREATE TABLE collate3t1(c1 COLLATE string_compare, c2); } db close - sqlite db test.db + sqlite3 db test.db expr 0 } 0 do_test collate3-2.1 { @@ -186,7 +186,7 @@ do_test collate3-3.0 { INSERT INTO collate3t1 VALUES('xxx', 'yyy'); } db close - sqlite db test.db + sqlite3 db test.db expr 0 } 0 db eval {select * from collate3t1} @@ -274,7 +274,7 @@ do_test collate3-4.6 { } {} do_test collate3-4.7 { db close - sqlite db test.db + sqlite3 db test.db catchsql { SELECT * FROM collate3t1 ORDER BY a COLLATE user_defined; } @@ -288,7 +288,7 @@ do_test collate3-4.8 { do_test collate3-4.8 { db close lindex [catch { - sqlite db test.db + sqlite3 db test.db }] 0 } {0} do_test collate3-4.8 { @@ -323,7 +323,7 @@ do_test collate3-4.9 { } {2 {} 12 {} 101 {}} do_test collate3-4.10 { db close - sqlite db test.db + sqlite3 db test.db catchsql { SELECT * FROM collate3v1; } @@ -387,7 +387,7 @@ do_test collate3-5.7 { CREATE TABLE collate3t1(a COLLATE unk); } db close - sqlite db test.db + sqlite3 db test.db catchsql { SELECT a FROM collate3t1 ORDER BY 1; } diff --git a/test/delete.test b/test/delete.test index c22091b36..7f19f0789 100644 --- a/test/delete.test +++ b/test/delete.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the DELETE FROM statement. # -# $Id: delete.test,v 1.15 2004/06/10 05:59:25 danielk1977 Exp $ +# $Id: delete.test,v 1.16 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -260,7 +260,7 @@ do_test delete-8.0 { db close catch {file attributes test.db -permissions 0444} catch {file attributes test.db -readonly 1} -sqlite db test.db +sqlite3 db test.db do_test delete-8.1 { catchsql { DELETE FROM t3; diff --git a/test/enc.test b/test/enc.test index f2c06cfc3..6b4575e6b 100644 --- a/test/enc.test +++ b/test/enc.test @@ -13,7 +13,7 @@ # various suported unicode encodings (UTF-8, UTF-16, UTF-16le and # UTF-16be). # -# $Id: enc.test,v 1.2 2004/06/18 04:24:56 danielk1977 Exp $ +# $Id: enc.test,v 1.3 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -74,23 +74,23 @@ proc swap_byte_order {utf16} { proc test_conversion {testname str} { # Step 1. - set utf16le_sqlite [test_translate $str UTF8 UTF16LE] + set utf16le_sqlite3 [test_translate $str UTF8 UTF16LE] set utf16le_tcl [encoding convertto unicode $str] append utf16le_tcl "\x00\x00" if { $::tcl_platform(byteOrder)!="littleEndian" } { set utf16le_tcl [swap_byte_order $utf16le_tcl] } - do_bincmp_test $testname.1 $utf16le_sqlite $utf16le_tcl + do_bincmp_test $testname.1 $utf16le_sqlite3 $utf16le_tcl set utf16le $utf16le_tcl # Step 2. - set utf16be_sqlite [test_translate $str UTF8 UTF16BE] + set utf16be_sqlite3 [test_translate $str UTF8 UTF16BE] set utf16be_tcl [encoding convertto unicode $str] append utf16be_tcl "\x00\x00" if { $::tcl_platform(byteOrder)=="littleEndian" } { set utf16be_tcl [swap_byte_order $utf16be_tcl] } - do_bincmp_test $testname.2 $utf16be_sqlite $utf16be_tcl + do_bincmp_test $testname.2 $utf16be_sqlite3 $utf16be_tcl set utf16be $utf16be_tcl # Step 3. @@ -99,34 +99,34 @@ proc test_conversion {testname str} { } else { set utf16 $utf16be } - set utf8_sqlite [test_translate $utf16 UTF16 UTF8] - do_bincmp_test $testname.3 $utf8_sqlite [binarize $str] + set utf8_sqlite3 [test_translate $utf16 UTF16 UTF8] + do_bincmp_test $testname.3 $utf8_sqlite3 [binarize $str] # Step 4 (little endian). append utf16le_bom "\xFF\xFE" $utf16le - set utf8_sqlite [test_translate $utf16le_bom UTF16 UTF8] - do_bincmp_test $testname.4.le $utf8_sqlite [binarize $str] + set utf8_sqlite3 [test_translate $utf16le_bom UTF16 UTF8] + do_bincmp_test $testname.4.le $utf8_sqlite3 [binarize $str] # Step 4 (big endian). append utf16be_bom "\xFE\xFF" $utf16be - set utf8_sqlite [test_translate $utf16be_bom UTF16 UTF8] - do_bincmp_test $testname.4.be $utf8_sqlite [binarize $str] + set utf8_sqlite3 [test_translate $utf16be_bom UTF16 UTF8] + do_bincmp_test $testname.4.be $utf8_sqlite3 [binarize $str] # Step 5 (little endian to little endian). - set utf16_sqlite [test_translate $utf16le_bom UTF16LE UTF16LE] - do_bincmp_test $testname.5.le.le $utf16_sqlite $utf16le + set utf16_sqlite3 [test_translate $utf16le_bom UTF16LE UTF16LE] + do_bincmp_test $testname.5.le.le $utf16_sqlite3 $utf16le # Step 5 (big endian to big endian). - set utf16_sqlite [test_translate $utf16be_bom UTF16 UTF16BE] - do_bincmp_test $testname.5.be.be $utf16_sqlite $utf16be + set utf16_sqlite3 [test_translate $utf16be_bom UTF16 UTF16BE] + do_bincmp_test $testname.5.be.be $utf16_sqlite3 $utf16be # Step 5 (big endian to little endian). - set utf16_sqlite [test_translate $utf16be_bom UTF16 UTF16LE] - do_bincmp_test $testname.5.be.le $utf16_sqlite $utf16le + set utf16_sqlite3 [test_translate $utf16be_bom UTF16 UTF16LE] + do_bincmp_test $testname.5.be.le $utf16_sqlite3 $utf16le # Step 5 (little endian to big endian). - set utf16_sqlite [test_translate $utf16le_bom UTF16 UTF16BE] - do_bincmp_test $testname.5.le.be $utf16_sqlite $utf16be + set utf16_sqlite3 [test_translate $utf16le_bom UTF16 UTF16BE] + do_bincmp_test $testname.5.le.be $utf16_sqlite3 $utf16be } translate_selftest diff --git a/test/enc2.test b/test/enc2.test index 8c624be7d..5ab8189ed 100644 --- a/test/enc2.test +++ b/test/enc2.test @@ -13,7 +13,7 @@ # various suported unicode encodings (UTF-8, UTF-16, UTF-16le and # UTF-16be). # -# $Id: enc2.test,v 1.11 2004/06/18 06:02:35 danielk1977 Exp $ +# $Id: enc2.test,v 1.12 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -61,7 +61,7 @@ proc run_test_script {t enc} { # Open the database and pull out a (the) row. do_test $t.1 { - set DB [sqlite db test.db] + set DB [sqlite3 db test.db] execsql {SELECT * FROM t1} } {one I 1} @@ -127,7 +127,7 @@ set sqlite_os_trace 0 set i 1 foreach enc $encodings { file delete -force test.db - sqlite db test.db + sqlite3 db test.db db eval "PRAGMA encoding = \"$enc\"" execsql $dbcontents db close @@ -140,13 +140,13 @@ foreach enc $encodings { # encoding to the main database. do_test enc2-4.1 { file delete -force test.db - sqlite db test.db + sqlite3 db test.db db eval "PRAGMA encoding = 'UTF-8'" db eval "CREATE TABLE abc(a, b, c);" } {} do_test enc2-4.2 { file delete -force test2.db - sqlite db2 test2.db + sqlite3 db2 test2.db db2 eval "PRAGMA encoding = 'UTF-16'" db2 eval "CREATE TABLE abc(a, b, c);" } {} @@ -173,7 +173,7 @@ proc test_collate {enc lhs rhs} { } file delete -force test.db -set DB [sqlite db test.db] +set DB [sqlite3 db test.db] do_test enc2-5.0 { execsql { CREATE TABLE t5(a); @@ -202,7 +202,7 @@ do_test enc2-5.3 { db close file delete -force test.db -set DB [sqlite db test.db] +set DB [sqlite3 db test.db] execsql {pragma encoding = 'UTF-16LE'} do_test enc2-5.4 { execsql { @@ -232,7 +232,7 @@ do_test enc2-5.7 { db close file delete -force test.db -set DB [sqlite db test.db] +set DB [sqlite3 db test.db] execsql {pragma encoding = 'UTF-16BE'} do_test enc2-5.8 { execsql { @@ -272,7 +272,7 @@ file delete -force test.db # 4: Ensure the first handle recognises the database encoding is UTF-8. # do_test enc2-6.1 { - sqlite db test.db + sqlite3 db test.db execsql { PRAGMA encoding = 'UTF-16'; SELECT * FROM sqlite_master; @@ -285,7 +285,7 @@ do_test enc2-6.2 { string range $enc 0 end-2 ;# Chop off the "le" or "be" } {UTF-16} do_test enc2-6.3 { - sqlite db2 test.db + sqlite3 db2 test.db execsql { PRAGMA encoding = 'UTF-8'; CREATE TABLE abc(a, b, c); diff --git a/test/expr.test b/test/expr.test index bfc03aeb6..6297417d1 100644 --- a/test/expr.test +++ b/test/expr.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing expressions. # -# $Id: expr.test,v 1.34 2004/06/17 05:36:45 danielk1977 Exp $ +# $Id: expr.test,v 1.35 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -29,7 +29,7 @@ proc test_expr {name settings expr result} { test_expr expr-1.1 {i1=10, i2=20} {i1+i2} 30 test_expr expr-1.2 {i1=10, i2=20} {i1-i2} -10 test_expr expr-1.3 {i1=10, i2=20} {i1*i2} 200 -# update for sqlite v3: Change 0.5 to 0 in expr1.4 due to manifest types. +# update for sqlite3 v3: Change 0.5 to 0 in expr1.4 due to manifest types. test_expr expr-1.4 {i1=10, i2=20} {i1/i2} 0 test_expr expr-1.5 {i1=10, i2=20} {i2/i1} 2 test_expr expr-1.6 {i1=10, i2=20} {i2<i1} 0 diff --git a/test/func.test b/test/func.test index 66c547fe3..a631526c9 100644 --- a/test/func.test +++ b/test/func.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing built-in functions. # -# $Id: func.test,v 1.22 2004/06/17 05:36:45 danielk1977 Exp $ +# $Id: func.test,v 1.23 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -278,7 +278,7 @@ do_test func-9.1 { # functions. # db close -set ::DB [sqlite db test.db] +set ::DB [sqlite3 db test.db] sqlite_register_test_function $::DB testfunc do_test func-10.1 { catchsql { @@ -334,9 +334,9 @@ do_test func-11.1 { execsql { SELECT sqlite_version(*); } -} [sqlite -version] +} [sqlite3 -version] -# Test that destructors passed to sqlite by calls to sqlite3_result_text() +# Test that destructors passed to sqlite3 by calls to sqlite3_result_text() # etc. are called. These tests use two special user-defined functions # (implemented in func.c) only available in test builds. # @@ -423,7 +423,7 @@ do_test func-13.6 { # Test that auxilary data is preserved between calls for SQL variables. do_test func-13.7 { db close - set DB [sqlite db test.db] + set DB [sqlite3 db test.db] set sql "SELECT test_auxdata( ? , a ) FROM t4;" set STMT [sqlite3_prepare $DB $sql -1 TAIL] sqlite3_bind_text $STMT 1 hello -1 diff --git a/test/index.test b/test/index.test index a0b58dc1b..283046eef 100644 --- a/test/index.test +++ b/test/index.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the CREATE INDEX statement. # -# $Id: index.test,v 1.29 2004/06/17 06:13:35 danielk1977 Exp $ +# $Id: index.test,v 1.30 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -29,13 +29,13 @@ do_test index-1.1b { } {index1 {CREATE INDEX index1 ON test1(f1)} test1 index} do_test index-1.1c { db close - sqlite db test.db + sqlite3 db test.db execsql {SELECT name, sql, tbl_name, type FROM sqlite_master WHERE name='index1'} } {index1 {CREATE INDEX index1 ON test1(f1)} test1 index} do_test index-1.1d { db close - sqlite db test.db + sqlite3 db test.db execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} } {index1 test1} @@ -344,7 +344,7 @@ integrity_check index-11.2 # same number they should compare equal to one another. Verify that this # is true in indices. # -# Updated for sqlite v3: SQLite will now store these values as numbers +# Updated for sqlite3 v3: SQLite will now store these values as numbers # (because the affinity of column a is NUMERIC) so the quirky # representations are not retained. i.e. '+1.0' becomes '1'. do_test index-12.1 { diff --git a/test/insert.test b/test/insert.test index def207be2..0be24dbac 100644 --- a/test/insert.test +++ b/test/insert.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the INSERT statement. # -# $Id: insert.test,v 1.17 2004/05/13 05:16:17 danielk1977 Exp $ +# $Id: insert.test,v 1.18 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -146,7 +146,7 @@ do_test insert-3.1 { } } {} -# Update for sqlite v3: +# Update for sqlite3 v3: # Change the 111 to '111' in the following two test cases, because # the default value is being inserted as a string. TODO: It shouldn't be. do_test insert-3.2 { diff --git a/test/ioerr.test b/test/ioerr.test index eeb1a49c2..2e1584198 100644 --- a/test/ioerr.test +++ b/test/ioerr.test @@ -15,7 +15,7 @@ # The tests in this file use special facilities that are only # available in the SQLite test fixture. # -# $Id: ioerr.test,v 1.4 2004/06/15 11:40:10 danielk1977 Exp $ +# $Id: ioerr.test,v 1.5 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -27,7 +27,7 @@ for {set n 1} {$go} {incr n} { db close catch {file delete -force test.db} catch {file delete -force test.db-journal} - sqlite db test.db + sqlite3 db test.db execsql {SELECT * FROM sqlite_master} } {} do_test ioerr-1.$n.2 [subst { @@ -80,7 +80,7 @@ for {set n 1} {$go} {incr n} { db close catch {file delete -force test.db} catch {file delete -force test.db-journal} - sqlite db test.db + sqlite3 db test.db execsql { BEGIN; CREATE TABLE t1(a, b, c); @@ -120,7 +120,7 @@ set sqlite_os_trace 0 expr {$::sqlite_io_error_pending>0 || $r!=0} set ::sqlite_io_error_pending 0 db close - sqlite db test.db + sqlite3 db test.db cksum } $cksum } diff --git a/test/lock.test b/test/lock.test index bfdca6063..7d5f04c33 100644 --- a/test/lock.test +++ b/test/lock.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is database locks. # -# $Id: lock.test,v 1.25 2004/06/14 08:26:37 danielk1977 Exp $ +# $Id: lock.test,v 1.26 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] @@ -20,7 +20,7 @@ source $testdir/tester.tcl # Create an alternative connection to the database # do_test lock-1.0 { - sqlite db2 ./test.db + sqlite3 db2 ./test.db set dummy {} } {} do_test lock-1.1 { @@ -273,7 +273,7 @@ do_test lock-4.1 { catch {db eval ROLLBACK} db eval BEGIN db eval {UPDATE t1 SET a=0 WHERE 0} - sqlite db2 ./test.db + sqlite3 db2 ./test.db catchsql {UPDATE t1 SET a=0} db2 } {1 {database is locked}} do_test lock-4.2 { diff --git a/test/main.test b/test/main.test index 2b98ace0c..df8c62e1b 100644 --- a/test/main.test +++ b/test/main.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is exercising the code in main.c. # -# $Id: main.test,v 1.14 2003/05/04 17:58:27 drh Exp $ +# $Id: main.test,v 1.15 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -242,7 +242,7 @@ do_test main-2.0 { set fd [open test.db w] puts $fd hi! close $fd - set v [catch {sqlite db test.db} msg] + set v [catch {sqlite3 db test.db} msg] if {$v} {lappend v $msg} {lappend v {}} } {0 {}} @@ -252,7 +252,7 @@ do_test main-3.1 { catch {db close} foreach f [glob -nocomplain testdb/*] {file delete -force $f} file delete -force testdb - sqlite db testdb + sqlite3 db testdb set v [catch {execsql {SELECT * from T1 where x!!5}} msg] lappend v $msg } {1 {unrecognized token: "!!"}} @@ -260,7 +260,7 @@ do_test main-3.2 { catch {db close} foreach f [glob -nocomplain testdb/*] {file delete -force $f} file delete -force testdb - sqlite db testdb + sqlite3 db testdb set v [catch {execsql {SELECT * from T1 where @x}} msg] lappend v $msg } {1 {unrecognized token: "@"}} @@ -269,7 +269,7 @@ do_test main-3.3 { catch {db close} foreach f [glob -nocomplain testdb/*] {file delete -force $f} file delete -force testdb - sqlite db testdb + sqlite3 db testdb execsql { create table T1(X REAL); insert into T1 values(0.5); diff --git a/test/malloc.test b/test/malloc.test index 58ea10a06..5cb1dd4de 100644 --- a/test/malloc.test +++ b/test/malloc.test @@ -14,7 +14,7 @@ # special feature is used to see what happens in the library if a malloc # were to really fail due to an out-of-memory situation. # -# $Id: malloc.test,v 1.7 2004/05/27 17:22:56 drh Exp $ +# $Id: malloc.test,v 1.8 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -34,7 +34,7 @@ for {set go 1; set i 1} {$go} {incr i} { catch {file delete -force test.db} catch {file delete -force test.db-journal} sqlite_malloc_fail $i - set v [catch {sqlite db test.db} msg] + set v [catch {sqlite3 db test.db} msg] if {$v} { set msg "" } else { @@ -78,7 +78,7 @@ for {set go 1; set i 1} {$go} {incr i} { catch {file delete -force test.db} catch {file delete -force test.db-journal} sqlite_malloc_fail $i - set v [catch {sqlite db test.db} msg] + set v [catch {sqlite3 db test.db} msg] if {$v} { set msg "" } else { @@ -122,7 +122,7 @@ for {set go 1; set i 1} {$go} {incr i} { catch {file delete -force test.db} catch {file delete -force test.db-journal} sqlite_malloc_fail $i - set v [catch {sqlite db test.db} msg] + set v [catch {sqlite3 db test.db} msg] if {$v} { set msg "" } else { @@ -162,7 +162,7 @@ for {set go 1; set i 1} {$go} {incr i} { catch {file delete -force test.db} catch {file delete -force test.db-journal} sqlite_malloc_fail $i - set v [catch {sqlite db test.db} msg] + set v [catch {sqlite3 db test.db} msg] if {$v} { set msg "" } else { @@ -203,7 +203,7 @@ for {set go 1; set i 1} {$go} {incr i} { catch {file delete -force test.db} catch {file delete -force test.db-journal} sqlite_malloc_fail $i - set v [catch {sqlite db test.db} msg] + set v [catch {sqlite3 db test.db} msg] if {$v} { set msg "" } else { diff --git a/test/memdb.test b/test/memdb.test index 33ad058e9..5519b7d53 100644 --- a/test/memdb.test +++ b/test/memdb.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is in-memory database backend. # -# $Id: memdb.test,v 1.8 2004/06/15 11:40:10 danielk1977 Exp $ +# $Id: memdb.test,v 1.9 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] @@ -25,8 +25,8 @@ source $testdir/tester.tcl # do_test memdb-1.1 { db close - sqlite db :memory: - # sqlite db test.db + sqlite3 db :memory: + # sqlite3 db test.db execsql { BEGIN; CREATE TABLE t3(x TEXT); diff --git a/test/memleak.test b/test/memleak.test index 81ac3b8d6..49dd0037b 100644 --- a/test/memleak.test +++ b/test/memleak.test @@ -10,7 +10,7 @@ #*********************************************************************** # This file runs all tests. # -# $Id: memleak.test,v 1.3 2004/02/12 18:46:39 drh Exp $ +# $Id: memleak.test,v 1.4 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -41,7 +41,7 @@ set EXCLUDE { btree2.test trans.test } -if {[sqlite -has-codec]} { +if {[sqlite3 -has-codec]} { lappend EXCLUDE \ attach.test \ attach2.test \ diff --git a/test/misc1.test b/test/misc1.test index a4e82477c..11240f04c 100644 --- a/test/misc1.test +++ b/test/misc1.test @@ -13,7 +13,7 @@ # This file implements tests for miscellanous features that were # left out of other test files. # -# $Id: misc1.test,v 1.27 2004/06/10 05:59:25 danielk1977 Exp $ +# $Id: misc1.test,v 1.28 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -328,7 +328,7 @@ do_test misc1-10.10 { do_test misc1-11.1 { execsql {BEGIN} execsql {UPDATE t1 SET a=0 WHERE 0} - sqlite db2 test.db + sqlite3 db2 test.db set rc [catch {db2 eval {SELECT count(*) FROM t1}} msg] lappend rc $msg # v2 result: {1 {database is locked}} diff --git a/test/misc2.test b/test/misc2.test index 646833a55..1eefe95f8 100644 --- a/test/misc2.test +++ b/test/misc2.test @@ -13,7 +13,7 @@ # This file implements tests for miscellanous features that were # left out of other test files. # -# $Id: misc2.test,v 1.11 2003/12/17 23:57:36 drh Exp $ +# $Id: misc2.test,v 1.12 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -121,7 +121,7 @@ do_test misc2-5.1 { # do_test misc2-6.1 { db close - sqlite db {} + sqlite3 db {} execsql { CREATE TABLE t1(a,b); INSERT INTO t1 VALUES(1,2); @@ -136,7 +136,7 @@ do_test misc2-6.1 { do_test misc2-7.1 { db close file delete -force test.db - sqlite db test.db + sqlite3 db test.db execsql { CREATE TABLE t1(x); INSERT INTO t1 VALUES(1); @@ -159,7 +159,7 @@ do_test misc2-7.2 { do_test misc2-7.3 { db close file delete -force test.db - sqlite db :memory: + sqlite3 db :memory: execsql { CREATE TABLE t1(x); INSERT INTO t1 VALUES(1); diff --git a/test/misuse.test b/test/misuse.test index 7f26280e8..20775ee63 100644 --- a/test/misuse.test +++ b/test/misuse.test @@ -13,7 +13,7 @@ # This file implements tests for the SQLITE_MISUSE detection logic. # This test file leaks memory and file descriptors. # -# $Id: misuse.test,v 1.4 2004/01/07 19:24:48 drh Exp $ +# $Id: misuse.test,v 1.5 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -23,7 +23,7 @@ source $testdir/tester.tcl do_test misuse-1.1 { db close catch {file delete -force test2.db} - set ::DB [sqlite db test2.db] + set ::DB [sqlite3 db test2.db] execsql { CREATE TABLE t1(a,b); INSERT INTO t1 VALUES(1,2); @@ -63,7 +63,7 @@ do_test misuse-1.6 { # do_test misuse-2.1 { db close - set ::DB [sqlite db test2.db] + set ::DB [sqlite3 db test2.db] execsql { SELECT * FROM t1 } @@ -92,7 +92,7 @@ do_test misuse-2.5 { # do_test misuse-3.1 { db close - set ::DB [sqlite db test2.db] + set ::DB [sqlite3 db test2.db] execsql { SELECT * FROM t1 } @@ -121,7 +121,7 @@ do_test misuse-3.5 { # do_test misuse-4.1 { db close - set ::DB [sqlite db test2.db] + set ::DB [sqlite3 db test2.db] execsql { SELECT * FROM t1 } @@ -150,7 +150,7 @@ do_test misuse-4.5 { # do_test misuse-5.1 { db close - set ::DB [sqlite db test2.db] + set ::DB [sqlite3 db test2.db] execsql { SELECT * FROM t1 } diff --git a/test/pager.test b/test/pager.test index 13be1ef0f..f0cf0094a 100644 --- a/test/pager.test +++ b/test/pager.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is page cache subsystem. # -# $Id: pager.test,v 1.16 2004/06/14 06:13:06 danielk1977 Exp $ +# $Id: pager.test,v 1.17 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] @@ -411,7 +411,7 @@ if 0 { # fault, but we might as well test for it. # do_test pager-5.1 { - sqlite db test.db + sqlite3 db test.db execsql { BEGIN; CREATE TABLE t1(x); diff --git a/test/pragma.test b/test/pragma.test index cb08e8ca7..365c67a56 100644 --- a/test/pragma.test +++ b/test/pragma.test @@ -12,7 +12,7 @@ # # This file implements tests for the PRAGMA command. # -# $Id: pragma.test,v 1.12 2004/05/26 06:58:45 danielk1977 Exp $ +# $Id: pragma.test,v 1.13 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -22,7 +22,7 @@ source $testdir/tester.tcl # db close file delete test.db -set DB [sqlite db test.db] +set DB [sqlite3 db test.db] do_test pragma-1.1 { execsql { @@ -43,7 +43,7 @@ do_test pragma-1.2 { } {1234 2000 1 1} do_test pragma-1.3 { db close - sqlite db test.db + sqlite3 db test.db execsql { PRAGMA cache_size; PRAGMA default_cache_size; @@ -80,7 +80,7 @@ do_test pragma-1.6 { } {4321 2000 1 1} do_test pragma-1.7 { db close - sqlite db test.db + sqlite3 db test.db execsql { PRAGMA cache_size; PRAGMA default_cache_size; @@ -108,7 +108,7 @@ do_test pragma-1.9 { } {123 123 0 0} do_test pragma-1.10 { db close - set ::DB [sqlite db test.db] + set ::DB [sqlite3 db test.db] execsql { PRAGMA cache_size; PRAGMA default_cache_size; @@ -136,7 +136,7 @@ do_test pragma-1.12 { } {123 123 2 0} do_test pragma-1.13 { db close - set ::DB [sqlite db test.db] + set ::DB [sqlite3 db test.db] execsql { PRAGMA cache_size; PRAGMA default_cache_size; @@ -155,7 +155,7 @@ do_test pragma-1.14 { } {123 123 2 2} do_test pragma-1.15 { db close - set ::DB [sqlite db test.db] + set ::DB [sqlite3 db test.db] execsql { PRAGMA cache_size; PRAGMA default_cache_size; @@ -167,7 +167,7 @@ do_test pragma-1.15 { # Construct a corrupted index and make sure the integrity_check # pragma finds it. # -if {![sqlite -has-codec]} { +if {![sqlite3 -has-codec]} { do_test pragma-3.1 { execsql { BEGIN; @@ -225,7 +225,7 @@ do_test pragma-4.6 { } {2} do_test pragma-4.7 { db close - sqlite db test.db + sqlite3 db test.db execsql { PRAGMA temp_store; } @@ -248,7 +248,7 @@ do_test pragma-4.10 { } {0} do_test pragma-4.11 { db close - sqlite db test.db + sqlite3 db test.db execsql { PRAGMA temp_store; } @@ -271,7 +271,7 @@ do_test pragma-4.14 { } {1} do_test pragma-4.15 { db close - sqlite db test.db + sqlite3 db test.db execsql { PRAGMA temp_store; } @@ -294,7 +294,7 @@ do_test pragma-4.18 { } {2} do_test pragma-4.19 { db close - sqlite db test.db + sqlite3 db test.db execsql { PRAGMA temp_store } diff --git a/test/quick.test b/test/quick.test index 2032e31b1..e6c67bc2e 100644 --- a/test/quick.test +++ b/test/quick.test @@ -10,7 +10,7 @@ #*********************************************************************** # This file runs all tests. # -# $Id: quick.test,v 1.23 2004/06/15 11:40:10 danielk1977 Exp $ +# $Id: quick.test,v 1.24 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -28,7 +28,7 @@ set EXCLUDE { format3.test } -if {[sqlite -has-codec]} { +if {[sqlite3 -has-codec]} { lappend EXCLUDE \ attach.test \ attach2.test \ diff --git a/test/rowid.test b/test/rowid.test index b3e61ba9a..cff09d0b9 100644 --- a/test/rowid.test +++ b/test/rowid.test @@ -12,7 +12,7 @@ # focus of this file is testing the magic ROWID column that is # found on all tables. # -# $Id: rowid.test,v 1.14 2004/05/13 11:34:17 danielk1977 Exp $ +# $Id: rowid.test,v 1.15 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -186,7 +186,7 @@ do_test rowid-3.4 { foreach {u v w x y z} $r2 {} expr {$u==$e && $w==$c && $y==$a} } {1} -# sqlite v3 - do_probtest doesn't exist anymore? +# sqlite3 v3 - do_probtest doesn't exist anymore? if 0 { do_probtest rowid-3.5 { set r1 [execsql {SELECT _rowid_, rowid FROM t2 ORDER BY rowid}] diff --git a/test/table.test b/test/table.test index 989c8d900..c56f53ef9 100644 --- a/test/table.test +++ b/test/table.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the CREATE TABLE statement. # -# $Id: table.test,v 1.26 2004/06/12 09:25:30 danielk1977 Exp $ +# $Id: table.test,v 1.27 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -45,7 +45,7 @@ do_test table-1.3 { # do_test table-1.4 { db close - sqlite db test.db + sqlite3 db test.db execsql {SELECT name, tbl_name, type from sqlite_master WHERE type!='meta'} } {test1 test1 table} @@ -61,7 +61,7 @@ do_test table-1.5 { # do_test table-1.6 { db close - sqlite db test.db + sqlite3 db test.db execsql {SELECT name FROM sqlite_master WHERE type!='meta'} } {} @@ -99,7 +99,7 @@ do_test table-2.1b { } {1 {object name reserved for internal use: sqlite_master}} do_test table-2.1c { db close - sqlite db test.db + sqlite3 db test.db set v [catch {execsql {CREATE TABLE sqlite_master(two text)}} msg] lappend v $msg } {1 {object name reserved for internal use: sqlite_master}} @@ -116,7 +116,7 @@ do_test table-2.2a { } {1 {there is already an index named test3}} do_test table-2.2b { db close - sqlite db test.db + sqlite3 db test.db set v [catch {execsql {CREATE TABLE test3(two text)}} msg] lappend v $msg } {1 {there is already an index named test3}} @@ -179,7 +179,7 @@ do_test table-3.4 { } {1 {table bIg already exists}} do_test table-3.5 { db close - sqlite db test.db + sqlite3 db test.db set v [catch {execsql {CREATE TABLE Big(xyz foo)}} msg] lappend v $msg } {1 {table Big already exists}} @@ -207,7 +207,7 @@ do_test table-4.1 { } $r do_test table-4.1b { db close - sqlite db test.db + sqlite3 db test.db execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} } $r @@ -350,7 +350,7 @@ do_test table-8.4 { } {y'all 1} do_test table-8.5 { db close - sqlite db test.db + sqlite3 db test.db execsql2 { SELECT * FROM [t4'abc]; } diff --git a/test/tclsqlite.test b/test/tclsqlite.test index bbf2d43f0..2920d97d0 100644 --- a/test/tclsqlite.test +++ b/test/tclsqlite.test @@ -15,20 +15,20 @@ # interface is pretty well tested. This file contains some addition # tests for fringe issues that the main test suite does not cover. # -# $Id: tclsqlite.test,v 1.23 2004/06/10 10:51:53 danielk1977 Exp $ +# $Id: tclsqlite.test,v 1.24 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Check the error messages generated by tclsqlite # -if {[sqlite -has-codec]} { +if {[sqlite3 -has-codec]} { set r "sqlite_orig HANDLE FILENAME ?-key CODEC-KEY?" } else { - set r "sqlite HANDLE FILENAME ?MODE?" + set r "sqlite3 HANDLE FILENAME ?MODE?" } do_test tcl-1.1 { - set v [catch {sqlite bogus} msg] + set v [catch {sqlite3 bogus} msg] lappend v $msg } [list 1 "wrong # args: should be \"$r\""] do_test tcl-1.2 { @@ -71,7 +71,7 @@ do_test tcl-1.6 { lappend v $msg } {1 {syntax error in expression "x*"}} -if {[sqlite -tcl-uses-utf]} { +if {[sqlite3 -tcl-uses-utf]} { do_test tcl-2.1 { execsql "CREATE TABLE t\u0123x(a int, b\u1235 float)" execsql "PRAGMA table_info(t\u0123x)" diff --git a/test/temptable.test b/test/temptable.test index 98321b2e7..089749003 100644 --- a/test/temptable.test +++ b/test/temptable.test @@ -12,7 +12,7 @@ # # This file implements tests for temporary tables and indices. # -# $Id: temptable.test,v 1.13 2004/06/14 08:26:37 danielk1977 Exp $ +# $Id: temptable.test,v 1.14 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -20,7 +20,7 @@ source $testdir/tester.tcl # Create an alternative connection to the database # do_test temptable-1.0 { - sqlite db2 ./test.db + sqlite3 db2 ./test.db set dummy {} } {} @@ -205,7 +205,7 @@ do_test temptable-4.5 { } {0 {9 8 7}} do_test temptable-4.6 { db2 close - sqlite db2 ./test.db + sqlite3 db2 ./test.db catchsql { SELECT * FROM t2; } db2 @@ -218,7 +218,7 @@ do_test temptable-4.7 { } {1 {no such table: t2}} do_test temptable-4.8 { db2 close - sqlite db2 ./test.db + sqlite3 db2 ./test.db execsql { CREATE TEMP TABLE t2(x unique,y); INSERT INTO t2 VALUES(1,2); @@ -272,7 +272,7 @@ do_test temptable-4.14 { } {3 4} do_test temptable-4.15 { db2 close - sqlite db2 ./test.db + sqlite3 db2 ./test.db execsql { SELECT * FROM t2; } db2 @@ -349,7 +349,7 @@ do_test temptable-6.2 { db close catch {file attributes test.db -permissions 0444} catch {file attributes test.db -readonly 1} - sqlite db test.db + sqlite3 db test.db if {[file writable test.db]} { error "Unable to make the database file test.db readonly - rerun this test as an unprivileged user" } @@ -392,7 +392,7 @@ do_test temptable-6.7 { } {0 {xyzzy 1 2}} do_test temptable-6.8 { db close - sqlite db test.db + sqlite3 db test.db catchsql { SELECT * FROM t8,t9; } diff --git a/test/tester.tcl b/test/tester.tcl index ae898c3ba..f84fa0da9 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -11,12 +11,12 @@ # This file implements some common TCL routines used for regression # testing the SQLite library # -# $Id: tester.tcl,v 1.36 2004/06/15 02:44:20 danielk1977 Exp $ +# $Id: tester.tcl,v 1.37 2004/06/19 00:16:31 drh Exp $ -# Make sure tclsqlite was compiled correctly. Abort now with an +# Make sure tclsqlite3 was compiled correctly. Abort now with an # error message if not. # -if {[sqlite -tcl-uses-utf]} { +if {[sqlite3 -tcl-uses-utf]} { if {"\u1234"=="u1234"} { puts stderr "***** BUILD PROBLEM *****" puts stderr "$argv0 was linked against an older version" @@ -42,9 +42,9 @@ if {[sqlite -tcl-uses-utf]} { # Use the pager codec if it is available # -if {[sqlite -has-codec] && [info command sqlite_orig]==""} { - rename sqlite sqlite_orig - proc sqlite {args} { +if {[sqlite3 -has-codec] && [info command sqlite_orig]==""} { + rename sqlite3 sqlite_orig + proc sqlite3 {args} { if {[llength $args]==2 && [string index [lindex $args 0] 0]!="-"} { lappend args -key {xyzzy} } @@ -58,7 +58,7 @@ if {[sqlite -has-codec] && [info command sqlite_orig]==""} { catch {db close} file delete -force test.db file delete -force test.db-journal -sqlite db ./test.db +sqlite3 db ./test.db if {[info exists ::SETUP_SQL]} { db eval $::SETUP_SQL } diff --git a/test/thread1.test b/test/thread1.test index 01beb6817..c50d24579 100644 --- a/test/thread1.test +++ b/test/thread1.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is multithreading behavior # -# $Id: thread1.test,v 1.6 2004/06/14 08:26:37 danielk1977 Exp $ +# $Id: thread1.test,v 1.7 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] @@ -19,7 +19,7 @@ source $testdir/tester.tcl # Skip this whole file if the thread testing code is not enabled # -if {[llength [info command thread_step]]==0 || [sqlite -has-codec]} { +if {[llength [info command thread_step]]==0 || [sqlite3 -has-codec]} { finish_test return } diff --git a/test/trans.test b/test/trans.test index f76e9dccf..5862c73a2 100644 --- a/test/trans.test +++ b/test/trans.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is database locks. # -# $Id: trans.test,v 1.22 2004/06/10 01:08:06 drh Exp $ +# $Id: trans.test,v 1.23 2004/06/19 00:16:31 drh Exp $ set testdir [file dirname $argv0] @@ -39,7 +39,7 @@ do_test trans-1.1 { } } {I V X} do_test trans-1.9 { - sqlite altdb test.db + sqlite3 altdb test.db execsql {SELECT b FROM one ORDER BY a} altdb } {one two three} do_test trans-1.10 { @@ -775,7 +775,7 @@ integrity_check trans-7.15 # set fd [open test.tcl w] puts $fd { - sqlite db test.db + sqlite3 db test.db db eval { PRAGMA default_cache_size=20; BEGIN; @@ -803,7 +803,7 @@ do_test trans-9.1 { PRAGMA default_cache_size=10; } db close - sqlite db test.db + sqlite3 db test.db execsql { BEGIN; CREATE TABLE t3(x TEXT); diff --git a/test/trigger1.test b/test/trigger1.test index 7c23f874d..7556a13cb 100644 --- a/test/trigger1.test +++ b/test/trigger1.test @@ -225,7 +225,7 @@ do_test trigger-3.2 { } {1 {no such table: main.t2}} do_test trigger-3.3 { db close - set rc [catch {sqlite db test.db} err] + set rc [catch {sqlite3 db test.db} err] if {$rc} {lappend rc $err} set rc } {0} @@ -267,7 +267,7 @@ do_test trigger-3.8 { } {1 2 3 4 3 4} do_test trigger-3.9 { db close - sqlite db test.db + sqlite3 db test.db execsql { INSERT INTO t1 VALUES(5,6); SELECT * FROM t1 UNION ALL SELECT * FROM t2; @@ -284,7 +284,7 @@ do_test trigger-4.1 { } } {3 4 7 8} do_test trigger-4.2 { - sqlite db2 test.db + sqlite3 db2 test.db execsql { INSERT INTO t1 VALUES(9,10); } db2; @@ -301,7 +301,7 @@ do_test trigger-4.3 { } {3 4 7 8} do_test trigger-4.4 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT * FROM t2; }; @@ -332,7 +332,7 @@ do_test trigger-6.4 { } {3 4 7 8} do_test trigger-6.5 { db close - sqlite db test.db + sqlite3 db test.db execsql {SELECT type, name FROM sqlite_master} } {view v1 table t2 trigger t2} do_test trigger-6.6 { @@ -346,7 +346,7 @@ do_test trigger-6.7 { } {3 4 7 8} do_test trigger-6.8 { db close - sqlite db test.db + sqlite3 db test.db execsql {SELECT * FROM t2} } {3 4 7 8} diff --git a/test/trigger4.test b/test/trigger4.test index c1384b1c1..16ed46781 100644 --- a/test/trigger4.test +++ b/test/trigger4.test @@ -36,7 +36,7 @@ do_test trigger4-1.2 { } {1 3} do_test trigger4-1.3 { db close - sqlite db test.db + sqlite3 db test.db execsql { insert into test values(4,5,6); select * from test1; @@ -66,7 +66,7 @@ do_test trigger4-2.2 { } {1 3 4 6} do_test trigger4-2.3 { db close - sqlite db test.db + sqlite3 db test.db execsql { update test set b=66 where id=4; select * from test1; @@ -86,7 +86,7 @@ do_test trigger4-3.1 { } {1 {no such table: main.test2}} do_test trigger4-3.2 { db close - sqlite db test.db + sqlite3 db test.db catchsql { insert into test values(7,8,9); } @@ -115,7 +115,7 @@ do_test trigger4-3.6 { } {7 9} do_test trigger4-3.7 { db close - sqlite db test.db + sqlite3 db test.db execsql { update test set b=99 where id=7; select * from test2; diff --git a/test/vacuum.test b/test/vacuum.test index b3877c2ca..d0aaa7bb3 100644 --- a/test/vacuum.test +++ b/test/vacuum.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the VACUUM statement. # -# $Id: vacuum.test,v 1.20 2004/05/29 10:43:07 danielk1977 Exp $ +# $Id: vacuum.test,v 1.21 2004/06/19 00:16:32 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -96,7 +96,7 @@ do_test vacuum-2.1 { } {1 {cannot VACUUM from within a transaction}} catch {db eval COMMIT} do_test vacuum-2.2 { - sqlite db2 test.db + sqlite3 db2 test.db execsql { BEGIN; CREATE TABLE t4 AS SELECT * FROM t1; @@ -125,7 +125,7 @@ do_test vacuum-3.1 { db close db2 close file delete test.db - sqlite db test.db + sqlite3 db test.db execsql { PRAGMA empty_result_callbacks=on; VACUUM; @@ -136,7 +136,7 @@ do_test vacuum-3.1 { # do_test vacuum-4.1 { db close - set DB [sqlite db test.db] + set DB [sqlite3 db test.db] set VM [sqlite3_prepare $DB {VACUUM} -1 TAIL] sqlite3_step $VM } {SQLITE_DONE} @@ -150,7 +150,7 @@ do_test vacuum-4.2 { do_test vacuum-5.1 { db close file delete -force test.db - sqlite db test.db + sqlite3 db test.db catchsql { CREATE TABLE Test (TestID int primary key); INSERT INTO Test VALUES (NULL); diff --git a/test/view.test b/test/view.test index 539a737ec..9a06ef964 100644 --- a/test/view.test +++ b/test/view.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing VIEW statements. # -# $Id: view.test,v 1.16 2003/05/31 16:21:13 drh Exp $ +# $Id: view.test,v 1.17 2004/06/19 00:16:32 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -46,7 +46,7 @@ do_test view-1.3 { } {1 2 4 5 7 8} do_test view-1.3.1 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT * FROM v1 ORDER BY a; } @@ -80,7 +80,7 @@ do_test view-1.7 { } {2 3 5 6 8 9} do_test view-1.8 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT * FROM v1 ORDER BY a; } @@ -265,7 +265,7 @@ do_test view-7.1 { } {1 2 3} do_test view-7.2 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT * FROM test; } @@ -281,7 +281,7 @@ do_test view-7.3 { } {1 2 3} do_test view-7.4 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT * FROM test; } @@ -297,7 +297,7 @@ do_test view-7.5 { } {1 2 3} do_test view-7.6 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT * FROM test; } @@ -311,7 +311,7 @@ do_test view-8.1 { } {7 2 13 5 19 8 27 12} do_test view-8.2 { db close - sqlite db test.db + sqlite3 db test.db execsql { SELECT * FROM v6 ORDER BY xyz; } |