1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Change the name of the TCL command from "sqlite" to "sqlite3" so that both

SQLite version 2 and SQLite version 3 can be used by Tcl at the same time. (CVS 1626)

FossilOrigin-Name: d705d051bed2b92b6c3bbcc75fe5b056633b9c31
This commit is contained in:
drh
2004-06-19 00:16:31 +00:00
parent 81c95efaf5
commit ef4ac8f9df
43 changed files with 247 additions and 247 deletions

View File

@ -1,5 +1,5 @@
C MinGW/MSYS\sbuild\sfixes;\sticket\s#765\s(CVS\s1625) C Change\sthe\sname\sof\sthe\sTCL\scommand\sfrom\s"sqlite"\sto\s"sqlite3"\sso\sthat\sboth\nSQLite\sversion\s2\sand\sSQLite\sversion\s3\scan\sbe\sused\sby\sTcl\sat\sthe\ssame\stime.\s(CVS\s1626)
D 2004-06-18T23:21:47 D 2004-06-19T00:16:31
F Makefile.in 2659cbce885c1365cb0a5fbeeed5ad69a354fa70 F Makefile.in 2659cbce885c1365cb0a5fbeeed5ad69a354fa70
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@ -59,7 +59,7 @@ F src/shell.c ca519519dcbbc582f6d88f7d0e7583b857fd3469
F src/sqlite.h.in eacd23af3280603cd8b48979c6f9297b3ac2935c F src/sqlite.h.in eacd23af3280603cd8b48979c6f9297b3ac2935c
F src/sqliteInt.h 570731b6aed20f0e5dd95b03442a215f17580c19 F src/sqliteInt.h 570731b6aed20f0e5dd95b03442a215f17580c19
F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2 F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2
F src/tclsqlite.c e1e9d89ce93e0372c519cc88d4a3f4df9ce5ff03 F src/tclsqlite.c 16a56baa1294cbea3cbc3131d71e7881cdee1d67
F src/test1.c 963f4417d1770f5238672ff5b817a9103842eeb7 F src/test1.c 963f4417d1770f5238672ff5b817a9103842eeb7
F src/test2.c db0a0c30b59f1639cb8c2572be06439402833cc8 F src/test2.c db0a0c30b59f1639cb8c2572be06439402833cc8
F src/test3.c 7247090d15a5a43823079b6fd8dad1ed3cccdedf F src/test3.c 7247090d15a5a43823079b6fd8dad1ed3cccdedf
@ -79,70 +79,70 @@ F src/vdbeaux.c dc0e7d3bdf3b6f322448b4bee29fe5bec656b4d4
F src/vdbemem.c 9359c53386e070fea9f5403cab0c6f0cfe36496b F src/vdbemem.c 9359c53386e070fea9f5403cab0c6f0cfe36496b
F src/where.c 6507074d8ce3f78e7a4cd33f667f11e62020553e F src/where.c 6507074d8ce3f78e7a4cd33f667f11e62020553e
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242 F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
F test/attach.test aed659e52635662bcd5069599aaca823533edf5a F test/attach.test 3acdffccbf5f78b07746771b9490758718e28856
F test/attach2.test 579d6cb94cb944e0d87a2bf8d6696e2036847e6a F test/attach2.test a05150eb43cf852599dcc491351c67a060337e4b
F test/attach3.test 8259ab833b5dcdf4acd75d9653f42f703ce2e013 F test/attach3.test 0ac01a2baf600768e36a8ef6e0a5d4d652b93e74
F test/auth.test 4077c84a150579eefb38e47e2b66f010d221d76a F test/auth.test a211eab0542ec024b578d771b09242dd9bb1aba3
F test/bigfile.test 5b079dfe7354a6c43b92a3ea5e49e4e5d88c789e F test/bigfile.test a1101b46528ad7282fb9b323d25da18672a3bd0a
F test/bigrow.test 8ab252dba108f12ad64e337b0f2ff31a807ac578 F test/bigrow.test 8ab252dba108f12ad64e337b0f2ff31a807ac578
F test/bind.test 4f5a19e84077b61ea797644b4942bb98b17bdd42 F test/bind.test 4ccea5041be85914608ba67097a85248c3e3134d
F test/blob.test b6474275536614352d6e1c729f23a18ba1082ae9 F test/blob.test 8727a7b46b2073a369cfc9bcb6f54dd366b9d884
F test/btree.test 77209dd37bb12ae501a0588b4c69bd7079ebdf1a F test/btree.test 77209dd37bb12ae501a0588b4c69bd7079ebdf1a
F test/btree2.test aa4a6d05b1ea90b1acaf83ba89039dd302a88635 F test/btree2.test aa4a6d05b1ea90b1acaf83ba89039dd302a88635
F test/btree4.test 3797b4305694c7af6828675b0f4b1424b8ca30e4 F test/btree4.test 3797b4305694c7af6828675b0f4b1424b8ca30e4
F test/btree5.test 8e5ff32c02e685d36516c6499add9375fe1377f2 F test/btree5.test 8e5ff32c02e685d36516c6499add9375fe1377f2
F test/btree6.test a5ede6bfbbb2ec8b27e62813612c0f28e8f3e027 F test/btree6.test a5ede6bfbbb2ec8b27e62813612c0f28e8f3e027
F test/btree7.test 429b96cfef5b51a7d512cfb4b5b3e453384af293 F test/btree7.test 429b96cfef5b51a7d512cfb4b5b3e453384af293
F test/capi2.test b161d9d80899192d3e5e809cf3db98248b5bdc04 F test/capi2.test 7a0d71b27cfc5337ec3525c02b9de269b5b9c175
F test/capi3.test b6fe8a66d2ffe28d4faaaec154a143131e8ff631 F test/capi3.test 6ed6bcbc8448dc7ee05c15596875f26fbaa1a037
F test/collate1.test 2ee4fa3a47a652ccf56c5ddf65dcc44d9bad82ef F test/collate1.test 2ee4fa3a47a652ccf56c5ddf65dcc44d9bad82ef
F test/collate2.test c1a3b41f761b28853c5696037f92de928f93233b F test/collate2.test c1a3b41f761b28853c5696037f92de928f93233b
F test/collate3.test 47cf6b393cadbad845f34ddfc04692bb3930986a F test/collate3.test e60b428e07ec945492ba90ff1c895902ee3a8a50
F test/collate4.test 0e9fc08ffcf6eddf72e354a15de06688fa86db31 F test/collate4.test 0e9fc08ffcf6eddf72e354a15de06688fa86db31
F test/collate5.test 1dd5f0f508c46667f9d4606c7950c414b0bdc0d5 F test/collate5.test 1dd5f0f508c46667f9d4606c7950c414b0bdc0d5
F test/collate6.test 2a45768914f04c1447a69d1358bbede376552675 F test/collate6.test 2a45768914f04c1447a69d1358bbede376552675
F test/conflict.test 45ce1e44ea748944aed233df8c278a9e1c4c87cc F test/conflict.test 45ce1e44ea748944aed233df8c278a9e1c4c87cc
F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2 F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
F test/date.test aed5030482ebc02bd8d386c6c86a29f694ab068d F test/date.test aed5030482ebc02bd8d386c6c86a29f694ab068d
F test/delete.test ac14bd6df5f1581d646eebc013d6b844a885dcf6 F test/delete.test 4f0c86e2bebdc822d179c80697b1ceabe6bbcd07
F test/enc.test dfdde0f660b592acbdafd107d15b2b7dd2a54f45 F test/enc.test e29a0d0558f4597ac1652a7bbac03b0e4ce17416
F test/enc2.test ffd3dbef6949c33f85b7152e465c88e29cbfbd81 F test/enc2.test 57c847492afd46eef7a498fc3853fe909a40fef7
F test/expr.test 2262ade5e4e98e359b11e40b01cb3498ac7fa42b F test/expr.test b4e945265c4c697bf5213b72558914ba10a989cc
F test/fkey1.test d65c824459916249bee501532d6154ddab0b5db7 F test/fkey1.test d65c824459916249bee501532d6154ddab0b5db7
F test/func.test 5fb6008f8805f8ff1f41cf269cf675aff8923c04 F test/func.test a680cac38851a49669eae6eee7dcf13057fae480
F test/hook.test c4102c672d67f8fb60ea459842805abcba69a747 F test/hook.test c4102c672d67f8fb60ea459842805abcba69a747
F test/in.test b92a2df9162e1cbd33c6449a29a05e6955b1741a F test/in.test b92a2df9162e1cbd33c6449a29a05e6955b1741a
F test/index.test 4bd370c6edff316916a3a9d934ef0c2cabad65b1 F test/index.test b6941dd532815f278042b85f79b1a6dc16c4d729
F test/insert.test 6ec324659656f4a86e4abfcf1a1fd2795ba6b603 F test/insert.test ebbab63db4ad69395a058514bccb3cdb0a029d48
F test/insert2.test c288375a64dad3295044714f0dfed4a193cf067f F test/insert2.test c288375a64dad3295044714f0dfed4a193cf067f
F test/interrupt.test 9142ce4448605127640eda5e283952f75f67ed91 F test/interrupt.test 9142ce4448605127640eda5e283952f75f67ed91
F test/intpkey.test e6e0d7cca0e64ec09cbf683a4712ed2196073742 F test/intpkey.test e6e0d7cca0e64ec09cbf683a4712ed2196073742
F test/ioerr.test ab1319619f4d90a0f5c0f9835dff48ac30e9c3dc F test/ioerr.test 7d087bfd1a1a53442940e000df936e0df0c5b886
F test/join.test 9ef6aabaac9de51d5fc41e68d1f4355da05a84cd F test/join.test 9ef6aabaac9de51d5fc41e68d1f4355da05a84cd
F test/join2.test c97e4c5aa65dea462145529e58212a709b4722b8 F test/join2.test c97e4c5aa65dea462145529e58212a709b4722b8
F test/lastinsert.test 31382f88b9b0270333ac9e4a17f2c2f4732da718 F test/lastinsert.test 31382f88b9b0270333ac9e4a17f2c2f4732da718
F test/laststmtchanges.test cabd11bdfbaf73a4486c50b58297d9c2038ccc18 F test/laststmtchanges.test cabd11bdfbaf73a4486c50b58297d9c2038ccc18
F test/limit.test 60d7f856ee7846f7130dee67f10f0e726cd70b5d F test/limit.test 60d7f856ee7846f7130dee67f10f0e726cd70b5d
F test/lock.test 3dca2c865d83fd1ab5730e8ad2fa69f81e0079e0 F test/lock.test 1dbf1d06b0a7eb36237b4f107cfb3da9726b449e
F test/main.test 6a851b5992c4881a725a3d9647e629199df8de9d F test/main.test e8c4d9ca6d1e5f5e55e6550d31aec488883b2ed9
F test/malloc.test 4e19b96d9cd7d61f4826e6fce03849ad5ad526dd F test/malloc.test 082206002cb3162fbbed1c3dd3794a06cee86652
F test/memdb.test ec2abdcf03c3497236d499b289c4b7eacde8c336 F test/memdb.test b8a13fa79f006bd087bbcf135ce8eb62056a6027
F test/memleak.test 4d5d374c8ea1fc5ac634aed58cac1047848ce65e F test/memleak.test eb3ca96a2e818788712732a42cc410635a712593
F test/minmax.test 9dcf52f713b1b9e61d0a88a51eb8bb2e3c52d0ab F test/minmax.test 9dcf52f713b1b9e61d0a88a51eb8bb2e3c52d0ab
F test/misc1.test 8472d2133c33efa29d514b464c4129f638b9cd31 F test/misc1.test a8eb48d38f7a64e75314a2946db68d2b77901b7d
F test/misc2.test 10c2ce26407d37411b96273e552d5095393732be F test/misc2.test 703734f5817215ca54e364833b3bf5ff36fcc21e
F test/misc3.test eb488314990bfc0959221a1acc465013238bf168 F test/misc3.test eb488314990bfc0959221a1acc465013238bf168
F test/misuse.test 1095f26d1aed406c65e1d2eba651c4bb7c38cbff F test/misuse.test 97456c4fa78be0c3151f41aa05c763b9f6b11f81
F test/notnull.test 7a08117a71e74b0321aaa937dbeb41a09d6eb1d0 F test/notnull.test 7a08117a71e74b0321aaa937dbeb41a09d6eb1d0
F test/null.test c14d0f4739f21e929b8115b72bf0c765b6bb1721 F test/null.test c14d0f4739f21e929b8115b72bf0c765b6bb1721
F test/pager.test b17ce7d4e89ab3618f6903f0ec318a13f855a849 F test/pager.test 059cc5c58d3b5a851343dff8c56cf7286425d03a
F test/pager2.test 55469c7c1c1a54d6b32d7b3cc99001e90101a1ce F test/pager2.test 55469c7c1c1a54d6b32d7b3cc99001e90101a1ce
F test/pragma.test 1b6792d4af550ca4973096d77fc278dd6c32c4dd F test/pragma.test e09ac12edbdac81d21ca88084fef376c7667f5b0
F test/printf.test 31ac25b4f85fbc7fb507be34c6c0731adbefcf80 F test/printf.test 31ac25b4f85fbc7fb507be34c6c0731adbefcf80
F test/progress.test 7542a6ac7894a1b7730c1f9a27f3f8b9388a4d25 x F test/progress.test 7542a6ac7894a1b7730c1f9a27f3f8b9388a4d25 x
F test/quick.test 32f64124a83c2a3b1de1444e253bc95e51e14048 F test/quick.test 0c191839eaceca22814982ae0f585cfad1f06154
F test/quote.test 08f23385c685d3dc7914ec760d492cacea7f6e3d F test/quote.test 08f23385c685d3dc7914ec760d492cacea7f6e3d
F test/rowid.test 863e6e75878cccf03d166fe52023f20e09508683 F test/rowid.test 8845b4861341ef23f94e51f27702335d9c5dcd31
F test/select1.test 2f161f9cdf9fb577336bc8c930edade538567123 F test/select1.test 2f161f9cdf9fb577336bc8c930edade538567123
F test/select2.test 91a2225926039b0d1687840735c284dbbf89f0bc F test/select2.test 91a2225926039b0d1687840735c284dbbf89f0bc
F test/select3.test ab2e583154ee230fa4b46b06512775a38cd9d8b0 F test/select3.test ab2e583154ee230fa4b46b06512775a38cd9d8b0
@ -151,26 +151,26 @@ F test/select5.test 3f3f0f31e674fa61f8a3bdb6af1517dfae674081
F test/select6.test a9e31906e700e7c7592c4d0acfc022808f718baf F test/select6.test a9e31906e700e7c7592c4d0acfc022808f718baf
F test/sort.test dbd94673b05054e44ca3f08a80faa1e890ef06d8 F test/sort.test dbd94673b05054e44ca3f08a80faa1e890ef06d8
F test/subselect.test f0fea8cf9f386d416d64d152e3c65f9116d0f50f F test/subselect.test f0fea8cf9f386d416d64d152e3c65f9116d0f50f
F test/table.test bbae9f267e947963f8951e72516667ab16c5810c F test/table.test 06c077c82d1a0df45426518064e674d97def6485
F test/tableapi.test 8651d6d1b043217aa851632b515ab68f185fb430 F test/tableapi.test 8651d6d1b043217aa851632b515ab68f185fb430
F test/tclsqlite.test 2ff5abfd1e133cddcfc61ad5850e3b93f4a7ff40 F test/tclsqlite.test a69e99b995c913dde3e554da8b3f8f483715fdd3
F test/temptable.test 3109726251fb4961010eb4d47e5c4df2af6b958d F test/temptable.test 63a16e3ad19adf073cfbcdf7624c92ac5236522c
F test/tester.tcl a3f5b6de9fa92b13aad2d3cac972b77638ce6e26 F test/tester.tcl f36cc22d0532725073ca78272d7834d56dceb6d9
F test/thread1.test fba29da98397c7f657008cf164b9212c1ad33f37 F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35
F test/threadtest1.c f5c7d628d5b23a1418816351b3cd8fe06e146250 F test/threadtest1.c f5c7d628d5b23a1418816351b3cd8fe06e146250
F test/threadtest2.c d94ca4114fd1504f7e0ae724bcd83d4b40931d86 F test/threadtest2.c d94ca4114fd1504f7e0ae724bcd83d4b40931d86
F test/trans.test 4a26c6fa3639202c334521954c17d8abe8a1c8e8 F test/trans.test 29645b344d2b9b6792793562b12340177ddd8f96
F test/trigger1.test 99b7cd9a568ac60aa04bbc3b9db9575ffa97709a F test/trigger1.test b45ef390959f736e5a4b7463c857939c48a7c6bb
F test/trigger2.test 0767ab30cb5a2c8402c8524f3d566b410b6f5263 F test/trigger2.test 0767ab30cb5a2c8402c8524f3d566b410b6f5263
F test/trigger3.test 70931be83fa3f563f7a5ca9e88b86f476af73948 F test/trigger3.test 70931be83fa3f563f7a5ca9e88b86f476af73948
F test/trigger4.test 542afce45774e8f8e1130b96b8675f414d6e4bd8 F test/trigger4.test 97c11d3cf43d752b172809bb82536372ee5e399c
F test/types.test 6c49e574970866558365a025b44c9fd8a162ef0d F test/types.test 6c49e574970866558365a025b44c9fd8a162ef0d
F test/types2.test 5d725fcb68dbd032c6d4950d568d75fa33872687 F test/types2.test 5d725fcb68dbd032c6d4950d568d75fa33872687
F test/unique.test 0e38d4cc7affeef2527720d1dafd1f6870f02f2b F test/unique.test 0e38d4cc7affeef2527720d1dafd1f6870f02f2b
F test/update.test b29bd9061a1150426dab6959806fcc73a41b1217 F test/update.test b29bd9061a1150426dab6959806fcc73a41b1217
F test/vacuum.test c11b73769bf1d6d607acf0227c3ce925dd20e41d F test/vacuum.test 3922b97f958986a9ab198c30480f54361087a06f
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102 F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
F test/view.test 1ee12c6f8f4791a2c0655120d5562a49400cfe53 F test/view.test b42c98499ae9fbf578cd7a4b020d23057c8825fb
F test/where.test 9c5752b807b78078fab8da6f52e689832579ca20 F test/where.test 9c5752b807b78078fab8da6f52e689832579ca20
F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
F tool/lemon.c db6a3bfaf3388c0f7aea3adb5e05acddcd427016 F tool/lemon.c db6a3bfaf3388c0f7aea3adb5e05acddcd427016
@ -225,7 +225,7 @@ F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
F www/version3.tcl af528563442e3039928f9018327a18157e53a44f F www/version3.tcl af528563442e3039928f9018327a18157e53a44f
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
P 3c6b9b41a682a7bb979acc1e269eea2384aa9d45 P 5f383c1ee1a2aec9e192f29528ec2a02f2329d19
R 4719ffddd7d2386ff948074c254db351 R 771d23822749d0f28022d62dca364529
U dougcurrie U drh
Z 732ff77795683407d59dc0e3a8abe1ac Z a954a2a14da20f7be34b1e468ea6d033

View File

@ -1 +1 @@
5f383c1ee1a2aec9e192f29528ec2a02f2329d19 d705d051bed2b92b6c3bbcc75fe5b056633b9c31

View File

@ -11,7 +11,7 @@
************************************************************************* *************************************************************************
** A TCL Interface to SQLite ** A TCL Interface to SQLite
** **
** $Id: tclsqlite.c,v 1.87 2004/06/18 17:10:17 drh Exp $ ** $Id: tclsqlite.c,v 1.88 2004/06/19 00:16:31 drh Exp $
*/ */
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
@ -1111,14 +1111,14 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
*/ */
int Sqlite3_Init(Tcl_Interp *interp){ int Sqlite3_Init(Tcl_Interp *interp){
Tcl_InitStubs(interp, "8.0", 0); Tcl_InitStubs(interp, "8.0", 0);
Tcl_CreateObjCommand(interp, "sqlite", (Tcl_ObjCmdProc*)DbMain, 0, 0); Tcl_CreateObjCommand(interp, "sqlite3", (Tcl_ObjCmdProc*)DbMain, 0, 0);
Tcl_PkgProvide(interp, "sqlite", "2.0"); Tcl_PkgProvide(interp, "sqlite3", "3.0");
return TCL_OK; return TCL_OK;
} }
int Tclsqlite3_Init(Tcl_Interp *interp){ int Tclsqlite3_Init(Tcl_Interp *interp){
Tcl_InitStubs(interp, "8.0", 0); Tcl_InitStubs(interp, "8.0", 0);
Tcl_CreateObjCommand(interp, "sqlite", (Tcl_ObjCmdProc*)DbMain, 0, 0); Tcl_CreateObjCommand(interp, "sqlite3", (Tcl_ObjCmdProc*)DbMain, 0, 0);
Tcl_PkgProvide(interp, "sqlite", "2.0"); Tcl_PkgProvide(interp, "sqlite3", "3.0");
return TCL_OK; return TCL_OK;
} }
int Sqlite3_SafeInit(Tcl_Interp *interp){ int Sqlite3_SafeInit(Tcl_Interp *interp){

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands # focus of this script is testing the ATTACH and DETACH commands
# and related functionality. # 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] set testdir [file dirname $argv0]
@ -33,7 +33,7 @@ do_test attach-1.1 {
} }
} {1 2 3 4} } {1 2 3 4}
do_test attach-1.2 { do_test attach-1.2 {
sqlite db2 test2.db sqlite3 db2 test2.db
execsql { execsql {
CREATE TABLE t2(x,y); CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(1,'x'); 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} } {table t2 t2 table tx tx trigger r1 t2 index i2 t2}
do_test attach-2.16 { do_test attach-2.16 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
ATTACH 'test2.db' AS db2; ATTACH 'test2.db' AS db2;
SELECT type, name, tbl_name FROM db2.sqlite_master; SELECT type, name, tbl_name FROM db2.sqlite_master;
@ -296,8 +296,8 @@ do_test attach-2.16 {
do_test attach-3.1 { do_test attach-3.1 {
db close db close
db2 close db2 close
sqlite db test.db sqlite3 db test.db
sqlite db2 test2.db sqlite3 db2 test2.db
execsql { execsql {
SELECT * FROM t1 SELECT * FROM t1
} }
@ -401,7 +401,7 @@ do_test attach-3.15 {
do_test attach-4.1 { do_test attach-4.1 {
execsql {DETACH db2} execsql {DETACH db2}
db2 close db2 close
sqlite db2 test2.db sqlite3 db2 test2.db
execsql { execsql {
CREATE TABLE t3(x,y); CREATE TABLE t3(x,y);
CREATE UNIQUE INDEX t3i1 ON t3(x); CREATE UNIQUE INDEX t3i1 ON t3(x);
@ -510,10 +510,10 @@ do_test attach-4.13 {
# #
do_test attach-5.1 { do_test attach-5.1 {
db close db close
sqlite db test.db sqlite3 db test.db
db2 close db2 close
file delete -force test2.db file delete -force test2.db
sqlite db2 test2.db sqlite3 db2 test2.db
catchsql { catchsql {
ATTACH DATABASE 'test.db' AS orig; ATTACH DATABASE 'test.db' AS orig;
CREATE TRIGGER r1 AFTER INSERT ON orig.t1 BEGIN; CREATE TRIGGER r1 AFTER INSERT ON orig.t1 BEGIN;
@ -598,7 +598,7 @@ do_test attach-6.1 {
} {0 {}} } {0 {}}
if {$tcl_platform(platform)=="unix"} { if {$tcl_platform(platform)=="unix"} {
do_test attach-6.2 { do_test attach-6.2 {
sqlite dbx cannot-read sqlite3 dbx cannot-read
dbx eval {CREATE TABLE t1(a,b,c)} dbx eval {CREATE TABLE t1(a,b,c)}
dbx close dbx close
file attributes cannot-read -permission 0000 file attributes cannot-read -permission 0000

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands # focus of this script is testing the ATTACH and DETACH commands
# and related functionality. # 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] set testdir [file dirname $argv0]
@ -31,7 +31,7 @@ do_test attach2-1.1 {
} }
file delete -force test2.db file delete -force test2.db
file delete -force test2.db-journal file delete -force test2.db-journal
sqlite db2 test2.db sqlite3 db2 test2.db
db2 eval { db2 eval {
CREATE TABLE t1(a,b); CREATE TABLE t1(a,b);
CREATE INDEX x1 ON t1(a); CREATE INDEX x1 ON t1(a);
@ -129,7 +129,7 @@ do_test attach2-2.12 {
# #
do_test attach2-3.1 { do_test attach2-3.1 {
db close 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] set rc [catch {sqlite3_prepare $DB "ATTACH 'test2.db' AS t2" -1 TAIL} VM]
if {$rc} {lappend rc $VM} if {$rc} {lappend rc $VM}
sqlite3_finalize $VM sqlite3_finalize $VM
@ -159,8 +159,8 @@ set sqlite_os_trace 0
# Tests attach2-4.* test that read-locks work correctly with attached # Tests attach2-4.* test that read-locks work correctly with attached
# databases. # databases.
do_test attach2-4.1 { do_test attach2-4.1 {
sqlite db test.db sqlite3 db test.db
sqlite db2 test.db sqlite3 db2 test.db
execsql {ATTACH 'test2.db' as file2} execsql {ATTACH 'test2.db' as file2}
execsql {ATTACH 'test2.db' as file2} db2 execsql {ATTACH 'test2.db' as file2} db2
} {} } {}
@ -311,7 +311,7 @@ file delete -force test2.db
# doesn't really prove too much. # doesn't really prove too much.
foreach f [glob test.db*] {file delete -force $f} foreach f [glob test.db*] {file delete -force $f}
do_test attach2-5.1 { do_test attach2-5.1 {
sqlite db test.db sqlite3 db test.db
execsql { execsql {
ATTACH 'test.db2' AS aux; ATTACH 'test.db2' AS aux;
} }

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands # focus of this script is testing the ATTACH and DETACH commands
# and schema changes to attached databases. # 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 # Create tables t1 and t2 in database file test2.db
file delete -force test2.db file delete -force test2.db
sqlite db2 test2.db sqlite3 db2 test2.db
execsql { execsql {
CREATE TABLE t1(a, b); CREATE TABLE t1(a, b);
CREATE TABLE t2(c, d); CREATE TABLE t2(c, d);

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands # focus of this script is testing the ATTACH and DETACH commands
# and related functionality. # 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] set testdir [file dirname $argv0]
@ -23,7 +23,7 @@ source $testdir/tester.tcl
do_test auth-1.1.1 { do_test auth-1.1.1 {
db close db close
set ::DB [sqlite db test.db] set ::DB [sqlite3 db test.db]
proc auth {code arg1 arg2 arg3 arg4} { proc auth {code arg1 arg2 arg3 arg4} {
if {$code=="SQLITE_INSERT" && $arg1=="sqlite_master"} { if {$code=="SQLITE_INSERT" && $arg1=="sqlite_master"} {
return SQLITE_DENY return SQLITE_DENY

View File

@ -12,7 +12,7 @@
# focus of this script testing the ability of SQLite to handle database # focus of this script testing the ability of SQLite to handle database
# files larger than 4GB. # 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] set testdir [file dirname $argv0]
@ -61,7 +61,7 @@ if {[catch {fake_big_file 4096 test.db}]} {
} }
do_test bigfile-1.2 { do_test bigfile-1.2 {
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT md5sum(x) FROM t1; SELECT md5sum(x) FROM t1;
} }
@ -83,7 +83,7 @@ do_test bigfile-1.3 {
} $::MAGIC_SUM } $::MAGIC_SUM
do_test bigfile-1.4 { do_test bigfile-1.4 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT md5sum(x) FROM t1; SELECT md5sum(x) FROM t1;
} }
@ -102,7 +102,7 @@ if {[catch {fake_big_file 8192 test.db}]} {
} }
do_test bigfile-1.6 { do_test bigfile-1.6 {
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT md5sum(x) FROM t1; SELECT md5sum(x) FROM t1;
} }
@ -115,7 +115,7 @@ do_test bigfile-1.7 {
} $::MAGIC_SUM } $::MAGIC_SUM
do_test bigfile-1.8 { do_test bigfile-1.8 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT md5sum(x) FROM t1; SELECT md5sum(x) FROM t1;
} }
@ -139,7 +139,7 @@ if {[catch {fake_big_file 16384 test.db}]} {
} }
do_test bigfile-1.11 { do_test bigfile-1.11 {
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT md5sum(x) FROM t1; SELECT md5sum(x) FROM t1;
} }
@ -152,7 +152,7 @@ do_test bigfile-1.12 {
} $::MAGIC_SUM } $::MAGIC_SUM
do_test bigfile-1.13 { do_test bigfile-1.13 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT md5sum(x) FROM t1; SELECT md5sum(x) FROM t1;
} }

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script testing the sqlite_bind API. # 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] set testdir [file dirname $argv0]
@ -36,7 +36,7 @@ proc sqlite_step {stmt N VALS COLS} {
do_test bind-1.1 { do_test bind-1.1 {
db close db close
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
execsql {CREATE TABLE t1(a,b,c)} execsql {CREATE TABLE t1(a,b,c)}
set VM [sqlite3_prepare $DB {INSERT INTO t1 VALUES(?,?,?)} -1 TAIL] set VM [sqlite3_prepare $DB {INSERT INTO t1 VALUES(?,?,?)} -1 TAIL]
set TAIL set TAIL

View File

@ -10,7 +10,7 @@
#*********************************************************************** #***********************************************************************
# This file implements regression tests for SQLite library. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -99,7 +99,7 @@ do_test blob-2.4 {
# Try to bind a blob value to a prepared statement. # Try to bind a blob value to a prepared statement.
do_test blob-3.0 { 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] set STMT [sqlite3_prepare $DB "DELETE FROM t1 WHERE a = ?" -1 DUMMY]
sqlite3_bind_blob $STMT 1 "\x12\x34\x56" 3 sqlite3_bind_blob $STMT 1 "\x12\x34\x56" 3
sqlite3_step $STMT sqlite3_step $STMT

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script testing the callback-free C/C++ API. # 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] set testdir [file dirname $argv0]
@ -73,7 +73,7 @@ proc get_column_names {STMT} {
# #
do_test capi2-1.1 { do_test capi2-1.1 {
db close db close
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
execsql {CREATE TABLE t1(a,b,c)} execsql {CREATE TABLE t1(a,b,c)}
set VM [sqlite3_prepare $DB {SELECT name, rowid FROM sqlite_master} -1 TAIL] set VM [sqlite3_prepare $DB {SELECT name, rowid FROM sqlite_master} -1 TAIL]
set TAIL set TAIL
@ -410,7 +410,7 @@ do_test capi2-6.1 {
COMMIT; COMMIT;
} }
set VM1 [sqlite3_prepare $DB {SELECT * FROM t3} -1 TAIL] set VM1 [sqlite3_prepare $DB {SELECT * FROM t3} -1 TAIL]
sqlite db2 test.db sqlite3 db2 test.db
execsql {BEGIN} db2 execsql {BEGIN} db2
} {} } {}
# Update for v3: BEGIN doesn't write-lock the database. It is quite # Update for v3: BEGIN doesn't write-lock the database. It is quite

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script testing the callback-free C/C++ API. # 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] set testdir [file dirname $argv0]
@ -51,7 +51,7 @@ proc utf8 {str} {
# #
db close db close
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
do_test capi3-1.1 { do_test capi3-1.1 {
set STMT [sqlite3_prepare $DB {SELECT name FROM sqlite_master} -1 TAIL] set STMT [sqlite3_prepare $DB {SELECT name FROM sqlite_master} -1 TAIL]

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script is page cache subsystem. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -76,7 +76,7 @@ do_test collate3-2.0 {
CREATE TABLE collate3t1(c1 COLLATE string_compare, c2); CREATE TABLE collate3t1(c1 COLLATE string_compare, c2);
} }
db close db close
sqlite db test.db sqlite3 db test.db
expr 0 expr 0
} 0 } 0
do_test collate3-2.1 { do_test collate3-2.1 {
@ -186,7 +186,7 @@ do_test collate3-3.0 {
INSERT INTO collate3t1 VALUES('xxx', 'yyy'); INSERT INTO collate3t1 VALUES('xxx', 'yyy');
} }
db close db close
sqlite db test.db sqlite3 db test.db
expr 0 expr 0
} 0 } 0
db eval {select * from collate3t1} db eval {select * from collate3t1}
@ -274,7 +274,7 @@ do_test collate3-4.6 {
} {} } {}
do_test collate3-4.7 { do_test collate3-4.7 {
db close db close
sqlite db test.db sqlite3 db test.db
catchsql { catchsql {
SELECT * FROM collate3t1 ORDER BY a COLLATE user_defined; SELECT * FROM collate3t1 ORDER BY a COLLATE user_defined;
} }
@ -288,7 +288,7 @@ do_test collate3-4.8 {
do_test collate3-4.8 { do_test collate3-4.8 {
db close db close
lindex [catch { lindex [catch {
sqlite db test.db sqlite3 db test.db
}] 0 }] 0
} {0} } {0}
do_test collate3-4.8 { do_test collate3-4.8 {
@ -323,7 +323,7 @@ do_test collate3-4.9 {
} {2 {} 12 {} 101 {}} } {2 {} 12 {} 101 {}}
do_test collate3-4.10 { do_test collate3-4.10 {
db close db close
sqlite db test.db sqlite3 db test.db
catchsql { catchsql {
SELECT * FROM collate3v1; SELECT * FROM collate3v1;
} }
@ -387,7 +387,7 @@ do_test collate3-5.7 {
CREATE TABLE collate3t1(a COLLATE unk); CREATE TABLE collate3t1(a COLLATE unk);
} }
db close db close
sqlite db test.db sqlite3 db test.db
catchsql { catchsql {
SELECT a FROM collate3t1 ORDER BY 1; SELECT a FROM collate3t1 ORDER BY 1;
} }

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing the DELETE FROM statement. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -260,7 +260,7 @@ do_test delete-8.0 {
db close db close
catch {file attributes test.db -permissions 0444} catch {file attributes test.db -permissions 0444}
catch {file attributes test.db -readonly 1} catch {file attributes test.db -readonly 1}
sqlite db test.db sqlite3 db test.db
do_test delete-8.1 { do_test delete-8.1 {
catchsql { catchsql {
DELETE FROM t3; DELETE FROM t3;

View File

@ -13,7 +13,7 @@
# various suported unicode encodings (UTF-8, UTF-16, UTF-16le and # various suported unicode encodings (UTF-8, UTF-16, UTF-16le and
# UTF-16be). # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -74,23 +74,23 @@ proc swap_byte_order {utf16} {
proc test_conversion {testname str} { proc test_conversion {testname str} {
# Step 1. # 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] set utf16le_tcl [encoding convertto unicode $str]
append utf16le_tcl "\x00\x00" append utf16le_tcl "\x00\x00"
if { $::tcl_platform(byteOrder)!="littleEndian" } { if { $::tcl_platform(byteOrder)!="littleEndian" } {
set utf16le_tcl [swap_byte_order $utf16le_tcl] 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 set utf16le $utf16le_tcl
# Step 2. # 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] set utf16be_tcl [encoding convertto unicode $str]
append utf16be_tcl "\x00\x00" append utf16be_tcl "\x00\x00"
if { $::tcl_platform(byteOrder)=="littleEndian" } { if { $::tcl_platform(byteOrder)=="littleEndian" } {
set utf16be_tcl [swap_byte_order $utf16be_tcl] 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 set utf16be $utf16be_tcl
# Step 3. # Step 3.
@ -99,34 +99,34 @@ proc test_conversion {testname str} {
} else { } else {
set utf16 $utf16be set utf16 $utf16be
} }
set utf8_sqlite [test_translate $utf16 UTF16 UTF8] set utf8_sqlite3 [test_translate $utf16 UTF16 UTF8]
do_bincmp_test $testname.3 $utf8_sqlite [binarize $str] do_bincmp_test $testname.3 $utf8_sqlite3 [binarize $str]
# Step 4 (little endian). # Step 4 (little endian).
append utf16le_bom "\xFF\xFE" $utf16le append utf16le_bom "\xFF\xFE" $utf16le
set utf8_sqlite [test_translate $utf16le_bom UTF16 UTF8] set utf8_sqlite3 [test_translate $utf16le_bom UTF16 UTF8]
do_bincmp_test $testname.4.le $utf8_sqlite [binarize $str] do_bincmp_test $testname.4.le $utf8_sqlite3 [binarize $str]
# Step 4 (big endian). # Step 4 (big endian).
append utf16be_bom "\xFE\xFF" $utf16be append utf16be_bom "\xFE\xFF" $utf16be
set utf8_sqlite [test_translate $utf16be_bom UTF16 UTF8] set utf8_sqlite3 [test_translate $utf16be_bom UTF16 UTF8]
do_bincmp_test $testname.4.be $utf8_sqlite [binarize $str] do_bincmp_test $testname.4.be $utf8_sqlite3 [binarize $str]
# Step 5 (little endian to little endian). # Step 5 (little endian to little endian).
set utf16_sqlite [test_translate $utf16le_bom UTF16LE UTF16LE] set utf16_sqlite3 [test_translate $utf16le_bom UTF16LE UTF16LE]
do_bincmp_test $testname.5.le.le $utf16_sqlite $utf16le do_bincmp_test $testname.5.le.le $utf16_sqlite3 $utf16le
# Step 5 (big endian to big endian). # Step 5 (big endian to big endian).
set utf16_sqlite [test_translate $utf16be_bom UTF16 UTF16BE] set utf16_sqlite3 [test_translate $utf16be_bom UTF16 UTF16BE]
do_bincmp_test $testname.5.be.be $utf16_sqlite $utf16be do_bincmp_test $testname.5.be.be $utf16_sqlite3 $utf16be
# Step 5 (big endian to little endian). # Step 5 (big endian to little endian).
set utf16_sqlite [test_translate $utf16be_bom UTF16 UTF16LE] set utf16_sqlite3 [test_translate $utf16be_bom UTF16 UTF16LE]
do_bincmp_test $testname.5.be.le $utf16_sqlite $utf16le do_bincmp_test $testname.5.be.le $utf16_sqlite3 $utf16le
# Step 5 (little endian to big endian). # Step 5 (little endian to big endian).
set utf16_sqlite [test_translate $utf16le_bom UTF16 UTF16BE] set utf16_sqlite3 [test_translate $utf16le_bom UTF16 UTF16BE]
do_bincmp_test $testname.5.le.be $utf16_sqlite $utf16be do_bincmp_test $testname.5.le.be $utf16_sqlite3 $utf16be
} }
translate_selftest translate_selftest

View File

@ -13,7 +13,7 @@
# various suported unicode encodings (UTF-8, UTF-16, UTF-16le and # various suported unicode encodings (UTF-8, UTF-16, UTF-16le and
# UTF-16be). # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -61,7 +61,7 @@ proc run_test_script {t enc} {
# Open the database and pull out a (the) row. # Open the database and pull out a (the) row.
do_test $t.1 { do_test $t.1 {
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
execsql {SELECT * FROM t1} execsql {SELECT * FROM t1}
} {one I 1} } {one I 1}
@ -127,7 +127,7 @@ set sqlite_os_trace 0
set i 1 set i 1
foreach enc $encodings { foreach enc $encodings {
file delete -force test.db file delete -force test.db
sqlite db test.db sqlite3 db test.db
db eval "PRAGMA encoding = \"$enc\"" db eval "PRAGMA encoding = \"$enc\""
execsql $dbcontents execsql $dbcontents
db close db close
@ -140,13 +140,13 @@ foreach enc $encodings {
# encoding to the main database. # encoding to the main database.
do_test enc2-4.1 { do_test enc2-4.1 {
file delete -force test.db file delete -force test.db
sqlite db test.db sqlite3 db test.db
db eval "PRAGMA encoding = 'UTF-8'" db eval "PRAGMA encoding = 'UTF-8'"
db eval "CREATE TABLE abc(a, b, c);" db eval "CREATE TABLE abc(a, b, c);"
} {} } {}
do_test enc2-4.2 { do_test enc2-4.2 {
file delete -force test2.db file delete -force test2.db
sqlite db2 test2.db sqlite3 db2 test2.db
db2 eval "PRAGMA encoding = 'UTF-16'" db2 eval "PRAGMA encoding = 'UTF-16'"
db2 eval "CREATE TABLE abc(a, b, c);" db2 eval "CREATE TABLE abc(a, b, c);"
} {} } {}
@ -173,7 +173,7 @@ proc test_collate {enc lhs rhs} {
} }
file delete -force test.db file delete -force test.db
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
do_test enc2-5.0 { do_test enc2-5.0 {
execsql { execsql {
CREATE TABLE t5(a); CREATE TABLE t5(a);
@ -202,7 +202,7 @@ do_test enc2-5.3 {
db close db close
file delete -force test.db file delete -force test.db
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
execsql {pragma encoding = 'UTF-16LE'} execsql {pragma encoding = 'UTF-16LE'}
do_test enc2-5.4 { do_test enc2-5.4 {
execsql { execsql {
@ -232,7 +232,7 @@ do_test enc2-5.7 {
db close db close
file delete -force test.db file delete -force test.db
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
execsql {pragma encoding = 'UTF-16BE'} execsql {pragma encoding = 'UTF-16BE'}
do_test enc2-5.8 { do_test enc2-5.8 {
execsql { execsql {
@ -272,7 +272,7 @@ file delete -force test.db
# 4: Ensure the first handle recognises the database encoding is UTF-8. # 4: Ensure the first handle recognises the database encoding is UTF-8.
# #
do_test enc2-6.1 { do_test enc2-6.1 {
sqlite db test.db sqlite3 db test.db
execsql { execsql {
PRAGMA encoding = 'UTF-16'; PRAGMA encoding = 'UTF-16';
SELECT * FROM sqlite_master; 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" string range $enc 0 end-2 ;# Chop off the "le" or "be"
} {UTF-16} } {UTF-16}
do_test enc2-6.3 { do_test enc2-6.3 {
sqlite db2 test.db sqlite3 db2 test.db
execsql { execsql {
PRAGMA encoding = 'UTF-8'; PRAGMA encoding = 'UTF-8';
CREATE TABLE abc(a, b, c); CREATE TABLE abc(a, b, c);

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing expressions. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl 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.1 {i1=10, i2=20} {i1+i2} 30
test_expr expr-1.2 {i1=10, i2=20} {i1-i2} -10 test_expr expr-1.2 {i1=10, i2=20} {i1-i2} -10
test_expr expr-1.3 {i1=10, i2=20} {i1*i2} 200 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.4 {i1=10, i2=20} {i1/i2} 0
test_expr expr-1.5 {i1=10, i2=20} {i2/i1} 2 test_expr expr-1.5 {i1=10, i2=20} {i2/i1} 2
test_expr expr-1.6 {i1=10, i2=20} {i2<i1} 0 test_expr expr-1.6 {i1=10, i2=20} {i2<i1} 0

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing built-in functions. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -278,7 +278,7 @@ do_test func-9.1 {
# functions. # functions.
# #
db close db close
set ::DB [sqlite db test.db] set ::DB [sqlite3 db test.db]
sqlite_register_test_function $::DB testfunc sqlite_register_test_function $::DB testfunc
do_test func-10.1 { do_test func-10.1 {
catchsql { catchsql {
@ -334,9 +334,9 @@ do_test func-11.1 {
execsql { execsql {
SELECT sqlite_version(*); 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 # etc. are called. These tests use two special user-defined functions
# (implemented in func.c) only available in test builds. # (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. # Test that auxilary data is preserved between calls for SQL variables.
do_test func-13.7 { do_test func-13.7 {
db close db close
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
set sql "SELECT test_auxdata( ? , a ) FROM t4;" set sql "SELECT test_auxdata( ? , a ) FROM t4;"
set STMT [sqlite3_prepare $DB $sql -1 TAIL] set STMT [sqlite3_prepare $DB $sql -1 TAIL]
sqlite3_bind_text $STMT 1 hello -1 sqlite3_bind_text $STMT 1 hello -1

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE INDEX statement. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -29,13 +29,13 @@ do_test index-1.1b {
} {index1 {CREATE INDEX index1 ON test1(f1)} test1 index} } {index1 {CREATE INDEX index1 ON test1(f1)} test1 index}
do_test index-1.1c { do_test index-1.1c {
db close db close
sqlite db test.db sqlite3 db test.db
execsql {SELECT name, sql, tbl_name, type FROM sqlite_master execsql {SELECT name, sql, tbl_name, type FROM sqlite_master
WHERE name='index1'} WHERE name='index1'}
} {index1 {CREATE INDEX index1 ON test1(f1)} test1 index} } {index1 {CREATE INDEX index1 ON test1(f1)} test1 index}
do_test index-1.1d { do_test index-1.1d {
db close db close
sqlite db test.db sqlite3 db test.db
execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name}
} {index1 test1} } {index1 test1}
@ -344,7 +344,7 @@ integrity_check index-11.2
# same number they should compare equal to one another. Verify that this # same number they should compare equal to one another. Verify that this
# is true in indices. # 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 # (because the affinity of column a is NUMERIC) so the quirky
# representations are not retained. i.e. '+1.0' becomes '1'. # representations are not retained. i.e. '+1.0' becomes '1'.
do_test index-12.1 { do_test index-12.1 {

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing the INSERT statement. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl 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 # 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. # the default value is being inserted as a string. TODO: It shouldn't be.
do_test insert-3.2 { do_test insert-3.2 {

View File

@ -15,7 +15,7 @@
# The tests in this file use special facilities that are only # The tests in this file use special facilities that are only
# available in the SQLite test fixture. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -27,7 +27,7 @@ for {set n 1} {$go} {incr n} {
db close db close
catch {file delete -force test.db} catch {file delete -force test.db}
catch {file delete -force test.db-journal} catch {file delete -force test.db-journal}
sqlite db test.db sqlite3 db test.db
execsql {SELECT * FROM sqlite_master} execsql {SELECT * FROM sqlite_master}
} {} } {}
do_test ioerr-1.$n.2 [subst { do_test ioerr-1.$n.2 [subst {
@ -80,7 +80,7 @@ for {set n 1} {$go} {incr n} {
db close db close
catch {file delete -force test.db} catch {file delete -force test.db}
catch {file delete -force test.db-journal} catch {file delete -force test.db-journal}
sqlite db test.db sqlite3 db test.db
execsql { execsql {
BEGIN; BEGIN;
CREATE TABLE t1(a, b, c); CREATE TABLE t1(a, b, c);
@ -120,7 +120,7 @@ set sqlite_os_trace 0
expr {$::sqlite_io_error_pending>0 || $r!=0} expr {$::sqlite_io_error_pending>0 || $r!=0}
set ::sqlite_io_error_pending 0 set ::sqlite_io_error_pending 0
db close db close
sqlite db test.db sqlite3 db test.db
cksum cksum
} $cksum } $cksum
} }

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script is database locks. # 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] set testdir [file dirname $argv0]
@ -20,7 +20,7 @@ source $testdir/tester.tcl
# Create an alternative connection to the database # Create an alternative connection to the database
# #
do_test lock-1.0 { do_test lock-1.0 {
sqlite db2 ./test.db sqlite3 db2 ./test.db
set dummy {} set dummy {}
} {} } {}
do_test lock-1.1 { do_test lock-1.1 {
@ -273,7 +273,7 @@ do_test lock-4.1 {
catch {db eval ROLLBACK} catch {db eval ROLLBACK}
db eval BEGIN db eval BEGIN
db eval {UPDATE t1 SET a=0 WHERE 0} db eval {UPDATE t1 SET a=0 WHERE 0}
sqlite db2 ./test.db sqlite3 db2 ./test.db
catchsql {UPDATE t1 SET a=0} db2 catchsql {UPDATE t1 SET a=0} db2
} {1 {database is locked}} } {1 {database is locked}}
do_test lock-4.2 { do_test lock-4.2 {

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is exercising the code in main.c. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -242,7 +242,7 @@ do_test main-2.0 {
set fd [open test.db w] set fd [open test.db w]
puts $fd hi! puts $fd hi!
close $fd 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 {}} if {$v} {lappend v $msg} {lappend v {}}
} {0 {}} } {0 {}}
@ -252,7 +252,7 @@ do_test main-3.1 {
catch {db close} catch {db close}
foreach f [glob -nocomplain testdb/*] {file delete -force $f} foreach f [glob -nocomplain testdb/*] {file delete -force $f}
file delete -force testdb file delete -force testdb
sqlite db testdb sqlite3 db testdb
set v [catch {execsql {SELECT * from T1 where x!!5}} msg] set v [catch {execsql {SELECT * from T1 where x!!5}} msg]
lappend v $msg lappend v $msg
} {1 {unrecognized token: "!!"}} } {1 {unrecognized token: "!!"}}
@ -260,7 +260,7 @@ do_test main-3.2 {
catch {db close} catch {db close}
foreach f [glob -nocomplain testdb/*] {file delete -force $f} foreach f [glob -nocomplain testdb/*] {file delete -force $f}
file delete -force testdb file delete -force testdb
sqlite db testdb sqlite3 db testdb
set v [catch {execsql {SELECT * from T1 where @x}} msg] set v [catch {execsql {SELECT * from T1 where @x}} msg]
lappend v $msg lappend v $msg
} {1 {unrecognized token: "@"}} } {1 {unrecognized token: "@"}}
@ -269,7 +269,7 @@ do_test main-3.3 {
catch {db close} catch {db close}
foreach f [glob -nocomplain testdb/*] {file delete -force $f} foreach f [glob -nocomplain testdb/*] {file delete -force $f}
file delete -force testdb file delete -force testdb
sqlite db testdb sqlite3 db testdb
execsql { execsql {
create table T1(X REAL); create table T1(X REAL);
insert into T1 values(0.5); insert into T1 values(0.5);

View File

@ -14,7 +14,7 @@
# special feature is used to see what happens in the library if a malloc # 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. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl 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}
catch {file delete -force test.db-journal} catch {file delete -force test.db-journal}
sqlite_malloc_fail $i sqlite_malloc_fail $i
set v [catch {sqlite db test.db} msg] set v [catch {sqlite3 db test.db} msg]
if {$v} { if {$v} {
set msg "" set msg ""
} else { } 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}
catch {file delete -force test.db-journal} catch {file delete -force test.db-journal}
sqlite_malloc_fail $i sqlite_malloc_fail $i
set v [catch {sqlite db test.db} msg] set v [catch {sqlite3 db test.db} msg]
if {$v} { if {$v} {
set msg "" set msg ""
} else { } 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}
catch {file delete -force test.db-journal} catch {file delete -force test.db-journal}
sqlite_malloc_fail $i sqlite_malloc_fail $i
set v [catch {sqlite db test.db} msg] set v [catch {sqlite3 db test.db} msg]
if {$v} { if {$v} {
set msg "" set msg ""
} else { } 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}
catch {file delete -force test.db-journal} catch {file delete -force test.db-journal}
sqlite_malloc_fail $i sqlite_malloc_fail $i
set v [catch {sqlite db test.db} msg] set v [catch {sqlite3 db test.db} msg]
if {$v} { if {$v} {
set msg "" set msg ""
} else { } 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}
catch {file delete -force test.db-journal} catch {file delete -force test.db-journal}
sqlite_malloc_fail $i sqlite_malloc_fail $i
set v [catch {sqlite db test.db} msg] set v [catch {sqlite3 db test.db} msg]
if {$v} { if {$v} {
set msg "" set msg ""
} else { } else {

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script is in-memory database backend. # 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] set testdir [file dirname $argv0]
@ -25,8 +25,8 @@ source $testdir/tester.tcl
# #
do_test memdb-1.1 { do_test memdb-1.1 {
db close db close
sqlite db :memory: sqlite3 db :memory:
# sqlite db test.db # sqlite3 db test.db
execsql { execsql {
BEGIN; BEGIN;
CREATE TABLE t3(x TEXT); CREATE TABLE t3(x TEXT);

View File

@ -10,7 +10,7 @@
#*********************************************************************** #***********************************************************************
# This file runs all tests. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -41,7 +41,7 @@ set EXCLUDE {
btree2.test btree2.test
trans.test trans.test
} }
if {[sqlite -has-codec]} { if {[sqlite3 -has-codec]} {
lappend EXCLUDE \ lappend EXCLUDE \
attach.test \ attach.test \
attach2.test \ attach2.test \

View File

@ -13,7 +13,7 @@
# This file implements tests for miscellanous features that were # This file implements tests for miscellanous features that were
# left out of other test files. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -328,7 +328,7 @@ do_test misc1-10.10 {
do_test misc1-11.1 { do_test misc1-11.1 {
execsql {BEGIN} execsql {BEGIN}
execsql {UPDATE t1 SET a=0 WHERE 0} 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] set rc [catch {db2 eval {SELECT count(*) FROM t1}} msg]
lappend rc $msg lappend rc $msg
# v2 result: {1 {database is locked}} # v2 result: {1 {database is locked}}

View File

@ -13,7 +13,7 @@
# This file implements tests for miscellanous features that were # This file implements tests for miscellanous features that were
# left out of other test files. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -121,7 +121,7 @@ do_test misc2-5.1 {
# #
do_test misc2-6.1 { do_test misc2-6.1 {
db close db close
sqlite db {} sqlite3 db {}
execsql { execsql {
CREATE TABLE t1(a,b); CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(1,2); INSERT INTO t1 VALUES(1,2);
@ -136,7 +136,7 @@ do_test misc2-6.1 {
do_test misc2-7.1 { do_test misc2-7.1 {
db close db close
file delete -force test.db file delete -force test.db
sqlite db test.db sqlite3 db test.db
execsql { execsql {
CREATE TABLE t1(x); CREATE TABLE t1(x);
INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(1);
@ -159,7 +159,7 @@ do_test misc2-7.2 {
do_test misc2-7.3 { do_test misc2-7.3 {
db close db close
file delete -force test.db file delete -force test.db
sqlite db :memory: sqlite3 db :memory:
execsql { execsql {
CREATE TABLE t1(x); CREATE TABLE t1(x);
INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(1);

View File

@ -13,7 +13,7 @@
# This file implements tests for the SQLITE_MISUSE detection logic. # This file implements tests for the SQLITE_MISUSE detection logic.
# This test file leaks memory and file descriptors. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -23,7 +23,7 @@ source $testdir/tester.tcl
do_test misuse-1.1 { do_test misuse-1.1 {
db close db close
catch {file delete -force test2.db} catch {file delete -force test2.db}
set ::DB [sqlite db test2.db] set ::DB [sqlite3 db test2.db]
execsql { execsql {
CREATE TABLE t1(a,b); CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(1,2); INSERT INTO t1 VALUES(1,2);
@ -63,7 +63,7 @@ do_test misuse-1.6 {
# #
do_test misuse-2.1 { do_test misuse-2.1 {
db close db close
set ::DB [sqlite db test2.db] set ::DB [sqlite3 db test2.db]
execsql { execsql {
SELECT * FROM t1 SELECT * FROM t1
} }
@ -92,7 +92,7 @@ do_test misuse-2.5 {
# #
do_test misuse-3.1 { do_test misuse-3.1 {
db close db close
set ::DB [sqlite db test2.db] set ::DB [sqlite3 db test2.db]
execsql { execsql {
SELECT * FROM t1 SELECT * FROM t1
} }
@ -121,7 +121,7 @@ do_test misuse-3.5 {
# #
do_test misuse-4.1 { do_test misuse-4.1 {
db close db close
set ::DB [sqlite db test2.db] set ::DB [sqlite3 db test2.db]
execsql { execsql {
SELECT * FROM t1 SELECT * FROM t1
} }
@ -150,7 +150,7 @@ do_test misuse-4.5 {
# #
do_test misuse-5.1 { do_test misuse-5.1 {
db close db close
set ::DB [sqlite db test2.db] set ::DB [sqlite3 db test2.db]
execsql { execsql {
SELECT * FROM t1 SELECT * FROM t1
} }

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script is page cache subsystem. # 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] set testdir [file dirname $argv0]
@ -411,7 +411,7 @@ if 0 {
# fault, but we might as well test for it. # fault, but we might as well test for it.
# #
do_test pager-5.1 { do_test pager-5.1 {
sqlite db test.db sqlite3 db test.db
execsql { execsql {
BEGIN; BEGIN;
CREATE TABLE t1(x); CREATE TABLE t1(x);

View File

@ -12,7 +12,7 @@
# #
# This file implements tests for the PRAGMA command. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -22,7 +22,7 @@ source $testdir/tester.tcl
# #
db close db close
file delete test.db file delete test.db
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
do_test pragma-1.1 { do_test pragma-1.1 {
execsql { execsql {
@ -43,7 +43,7 @@ do_test pragma-1.2 {
} {1234 2000 1 1} } {1234 2000 1 1}
do_test pragma-1.3 { do_test pragma-1.3 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
PRAGMA cache_size; PRAGMA cache_size;
PRAGMA default_cache_size; PRAGMA default_cache_size;
@ -80,7 +80,7 @@ do_test pragma-1.6 {
} {4321 2000 1 1} } {4321 2000 1 1}
do_test pragma-1.7 { do_test pragma-1.7 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
PRAGMA cache_size; PRAGMA cache_size;
PRAGMA default_cache_size; PRAGMA default_cache_size;
@ -108,7 +108,7 @@ do_test pragma-1.9 {
} {123 123 0 0} } {123 123 0 0}
do_test pragma-1.10 { do_test pragma-1.10 {
db close db close
set ::DB [sqlite db test.db] set ::DB [sqlite3 db test.db]
execsql { execsql {
PRAGMA cache_size; PRAGMA cache_size;
PRAGMA default_cache_size; PRAGMA default_cache_size;
@ -136,7 +136,7 @@ do_test pragma-1.12 {
} {123 123 2 0} } {123 123 2 0}
do_test pragma-1.13 { do_test pragma-1.13 {
db close db close
set ::DB [sqlite db test.db] set ::DB [sqlite3 db test.db]
execsql { execsql {
PRAGMA cache_size; PRAGMA cache_size;
PRAGMA default_cache_size; PRAGMA default_cache_size;
@ -155,7 +155,7 @@ do_test pragma-1.14 {
} {123 123 2 2} } {123 123 2 2}
do_test pragma-1.15 { do_test pragma-1.15 {
db close db close
set ::DB [sqlite db test.db] set ::DB [sqlite3 db test.db]
execsql { execsql {
PRAGMA cache_size; PRAGMA cache_size;
PRAGMA default_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 # Construct a corrupted index and make sure the integrity_check
# pragma finds it. # pragma finds it.
# #
if {![sqlite -has-codec]} { if {![sqlite3 -has-codec]} {
do_test pragma-3.1 { do_test pragma-3.1 {
execsql { execsql {
BEGIN; BEGIN;
@ -225,7 +225,7 @@ do_test pragma-4.6 {
} {2} } {2}
do_test pragma-4.7 { do_test pragma-4.7 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
PRAGMA temp_store; PRAGMA temp_store;
} }
@ -248,7 +248,7 @@ do_test pragma-4.10 {
} {0} } {0}
do_test pragma-4.11 { do_test pragma-4.11 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
PRAGMA temp_store; PRAGMA temp_store;
} }
@ -271,7 +271,7 @@ do_test pragma-4.14 {
} {1} } {1}
do_test pragma-4.15 { do_test pragma-4.15 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
PRAGMA temp_store; PRAGMA temp_store;
} }
@ -294,7 +294,7 @@ do_test pragma-4.18 {
} {2} } {2}
do_test pragma-4.19 { do_test pragma-4.19 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
PRAGMA temp_store PRAGMA temp_store
} }

View File

@ -10,7 +10,7 @@
#*********************************************************************** #***********************************************************************
# This file runs all tests. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -28,7 +28,7 @@ set EXCLUDE {
format3.test format3.test
} }
if {[sqlite -has-codec]} { if {[sqlite3 -has-codec]} {
lappend EXCLUDE \ lappend EXCLUDE \
attach.test \ attach.test \
attach2.test \ attach2.test \

View File

@ -12,7 +12,7 @@
# focus of this file is testing the magic ROWID column that is # focus of this file is testing the magic ROWID column that is
# found on all tables. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -186,7 +186,7 @@ do_test rowid-3.4 {
foreach {u v w x y z} $r2 {} foreach {u v w x y z} $r2 {}
expr {$u==$e && $w==$c && $y==$a} expr {$u==$e && $w==$c && $y==$a}
} {1} } {1}
# sqlite v3 - do_probtest doesn't exist anymore? # sqlite3 v3 - do_probtest doesn't exist anymore?
if 0 { if 0 {
do_probtest rowid-3.5 { do_probtest rowid-3.5 {
set r1 [execsql {SELECT _rowid_, rowid FROM t2 ORDER BY rowid}] set r1 [execsql {SELECT _rowid_, rowid FROM t2 ORDER BY rowid}]

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE TABLE statement. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -45,7 +45,7 @@ do_test table-1.3 {
# #
do_test table-1.4 { do_test table-1.4 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql {SELECT name, tbl_name, type from sqlite_master WHERE type!='meta'} execsql {SELECT name, tbl_name, type from sqlite_master WHERE type!='meta'}
} {test1 test1 table} } {test1 test1 table}
@ -61,7 +61,7 @@ do_test table-1.5 {
# #
do_test table-1.6 { do_test table-1.6 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql {SELECT name FROM sqlite_master WHERE type!='meta'} 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}} } {1 {object name reserved for internal use: sqlite_master}}
do_test table-2.1c { do_test table-2.1c {
db close db close
sqlite db test.db sqlite3 db test.db
set v [catch {execsql {CREATE TABLE sqlite_master(two text)}} msg] set v [catch {execsql {CREATE TABLE sqlite_master(two text)}} msg]
lappend v $msg lappend v $msg
} {1 {object name reserved for internal use: sqlite_master}} } {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}} } {1 {there is already an index named test3}}
do_test table-2.2b { do_test table-2.2b {
db close db close
sqlite db test.db sqlite3 db test.db
set v [catch {execsql {CREATE TABLE test3(two text)}} msg] set v [catch {execsql {CREATE TABLE test3(two text)}} msg]
lappend v $msg lappend v $msg
} {1 {there is already an index named test3}} } {1 {there is already an index named test3}}
@ -179,7 +179,7 @@ do_test table-3.4 {
} {1 {table bIg already exists}} } {1 {table bIg already exists}}
do_test table-3.5 { do_test table-3.5 {
db close db close
sqlite db test.db sqlite3 db test.db
set v [catch {execsql {CREATE TABLE Big(xyz foo)}} msg] set v [catch {execsql {CREATE TABLE Big(xyz foo)}} msg]
lappend v $msg lappend v $msg
} {1 {table Big already exists}} } {1 {table Big already exists}}
@ -207,7 +207,7 @@ do_test table-4.1 {
} $r } $r
do_test table-4.1b { do_test table-4.1b {
db close db close
sqlite db test.db sqlite3 db test.db
execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name}
} $r } $r
@ -350,7 +350,7 @@ do_test table-8.4 {
} {y'all 1} } {y'all 1}
do_test table-8.5 { do_test table-8.5 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql2 { execsql2 {
SELECT * FROM [t4'abc]; SELECT * FROM [t4'abc];
} }

View File

@ -15,20 +15,20 @@
# interface is pretty well tested. This file contains some addition # interface is pretty well tested. This file contains some addition
# tests for fringe issues that the main test suite does not cover. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
# Check the error messages generated by tclsqlite # Check the error messages generated by tclsqlite
# #
if {[sqlite -has-codec]} { if {[sqlite3 -has-codec]} {
set r "sqlite_orig HANDLE FILENAME ?-key CODEC-KEY?" set r "sqlite_orig HANDLE FILENAME ?-key CODEC-KEY?"
} else { } else {
set r "sqlite HANDLE FILENAME ?MODE?" set r "sqlite3 HANDLE FILENAME ?MODE?"
} }
do_test tcl-1.1 { do_test tcl-1.1 {
set v [catch {sqlite bogus} msg] set v [catch {sqlite3 bogus} msg]
lappend v $msg lappend v $msg
} [list 1 "wrong # args: should be \"$r\""] } [list 1 "wrong # args: should be \"$r\""]
do_test tcl-1.2 { do_test tcl-1.2 {
@ -71,7 +71,7 @@ do_test tcl-1.6 {
lappend v $msg lappend v $msg
} {1 {syntax error in expression "x*"}} } {1 {syntax error in expression "x*"}}
if {[sqlite -tcl-uses-utf]} { if {[sqlite3 -tcl-uses-utf]} {
do_test tcl-2.1 { do_test tcl-2.1 {
execsql "CREATE TABLE t\u0123x(a int, b\u1235 float)" execsql "CREATE TABLE t\u0123x(a int, b\u1235 float)"
execsql "PRAGMA table_info(t\u0123x)" execsql "PRAGMA table_info(t\u0123x)"

View File

@ -12,7 +12,7 @@
# #
# This file implements tests for temporary tables and indices. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -20,7 +20,7 @@ source $testdir/tester.tcl
# Create an alternative connection to the database # Create an alternative connection to the database
# #
do_test temptable-1.0 { do_test temptable-1.0 {
sqlite db2 ./test.db sqlite3 db2 ./test.db
set dummy {} set dummy {}
} {} } {}
@ -205,7 +205,7 @@ do_test temptable-4.5 {
} {0 {9 8 7}} } {0 {9 8 7}}
do_test temptable-4.6 { do_test temptable-4.6 {
db2 close db2 close
sqlite db2 ./test.db sqlite3 db2 ./test.db
catchsql { catchsql {
SELECT * FROM t2; SELECT * FROM t2;
} db2 } db2
@ -218,7 +218,7 @@ do_test temptable-4.7 {
} {1 {no such table: t2}} } {1 {no such table: t2}}
do_test temptable-4.8 { do_test temptable-4.8 {
db2 close db2 close
sqlite db2 ./test.db sqlite3 db2 ./test.db
execsql { execsql {
CREATE TEMP TABLE t2(x unique,y); CREATE TEMP TABLE t2(x unique,y);
INSERT INTO t2 VALUES(1,2); INSERT INTO t2 VALUES(1,2);
@ -272,7 +272,7 @@ do_test temptable-4.14 {
} {3 4} } {3 4}
do_test temptable-4.15 { do_test temptable-4.15 {
db2 close db2 close
sqlite db2 ./test.db sqlite3 db2 ./test.db
execsql { execsql {
SELECT * FROM t2; SELECT * FROM t2;
} db2 } db2
@ -349,7 +349,7 @@ do_test temptable-6.2 {
db close db close
catch {file attributes test.db -permissions 0444} catch {file attributes test.db -permissions 0444}
catch {file attributes test.db -readonly 1} catch {file attributes test.db -readonly 1}
sqlite db test.db sqlite3 db test.db
if {[file writable test.db]} { if {[file writable test.db]} {
error "Unable to make the database file test.db readonly - rerun this test as an unprivileged user" 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}} } {0 {xyzzy 1 2}}
do_test temptable-6.8 { do_test temptable-6.8 {
db close db close
sqlite db test.db sqlite3 db test.db
catchsql { catchsql {
SELECT * FROM t8,t9; SELECT * FROM t8,t9;
} }

View File

@ -11,12 +11,12 @@
# This file implements some common TCL routines used for regression # This file implements some common TCL routines used for regression
# testing the SQLite library # 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. # error message if not.
# #
if {[sqlite -tcl-uses-utf]} { if {[sqlite3 -tcl-uses-utf]} {
if {"\u1234"=="u1234"} { if {"\u1234"=="u1234"} {
puts stderr "***** BUILD PROBLEM *****" puts stderr "***** BUILD PROBLEM *****"
puts stderr "$argv0 was linked against an older version" 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 # Use the pager codec if it is available
# #
if {[sqlite -has-codec] && [info command sqlite_orig]==""} { if {[sqlite3 -has-codec] && [info command sqlite_orig]==""} {
rename sqlite sqlite_orig rename sqlite3 sqlite_orig
proc sqlite {args} { proc sqlite3 {args} {
if {[llength $args]==2 && [string index [lindex $args 0] 0]!="-"} { if {[llength $args]==2 && [string index [lindex $args 0] 0]!="-"} {
lappend args -key {xyzzy} lappend args -key {xyzzy}
} }
@ -58,7 +58,7 @@ if {[sqlite -has-codec] && [info command sqlite_orig]==""} {
catch {db close} catch {db close}
file delete -force test.db file delete -force test.db
file delete -force test.db-journal file delete -force test.db-journal
sqlite db ./test.db sqlite3 db ./test.db
if {[info exists ::SETUP_SQL]} { if {[info exists ::SETUP_SQL]} {
db eval $::SETUP_SQL db eval $::SETUP_SQL
} }

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script is multithreading behavior # 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] 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 # 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 finish_test
return return
} }

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script is database locks. # 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] set testdir [file dirname $argv0]
@ -39,7 +39,7 @@ do_test trans-1.1 {
} }
} {I V X} } {I V X}
do_test trans-1.9 { do_test trans-1.9 {
sqlite altdb test.db sqlite3 altdb test.db
execsql {SELECT b FROM one ORDER BY a} altdb execsql {SELECT b FROM one ORDER BY a} altdb
} {one two three} } {one two three}
do_test trans-1.10 { do_test trans-1.10 {
@ -775,7 +775,7 @@ integrity_check trans-7.15
# #
set fd [open test.tcl w] set fd [open test.tcl w]
puts $fd { puts $fd {
sqlite db test.db sqlite3 db test.db
db eval { db eval {
PRAGMA default_cache_size=20; PRAGMA default_cache_size=20;
BEGIN; BEGIN;
@ -803,7 +803,7 @@ do_test trans-9.1 {
PRAGMA default_cache_size=10; PRAGMA default_cache_size=10;
} }
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
BEGIN; BEGIN;
CREATE TABLE t3(x TEXT); CREATE TABLE t3(x TEXT);

View File

@ -225,7 +225,7 @@ do_test trigger-3.2 {
} {1 {no such table: main.t2}} } {1 {no such table: main.t2}}
do_test trigger-3.3 { do_test trigger-3.3 {
db close db close
set rc [catch {sqlite db test.db} err] set rc [catch {sqlite3 db test.db} err]
if {$rc} {lappend rc $err} if {$rc} {lappend rc $err}
set rc set rc
} {0} } {0}
@ -267,7 +267,7 @@ do_test trigger-3.8 {
} {1 2 3 4 3 4} } {1 2 3 4 3 4}
do_test trigger-3.9 { do_test trigger-3.9 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
INSERT INTO t1 VALUES(5,6); INSERT INTO t1 VALUES(5,6);
SELECT * FROM t1 UNION ALL SELECT * FROM t2; SELECT * FROM t1 UNION ALL SELECT * FROM t2;
@ -284,7 +284,7 @@ do_test trigger-4.1 {
} }
} {3 4 7 8} } {3 4 7 8}
do_test trigger-4.2 { do_test trigger-4.2 {
sqlite db2 test.db sqlite3 db2 test.db
execsql { execsql {
INSERT INTO t1 VALUES(9,10); INSERT INTO t1 VALUES(9,10);
} db2; } db2;
@ -301,7 +301,7 @@ do_test trigger-4.3 {
} {3 4 7 8} } {3 4 7 8}
do_test trigger-4.4 { do_test trigger-4.4 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT * FROM t2; SELECT * FROM t2;
}; };
@ -332,7 +332,7 @@ do_test trigger-6.4 {
} {3 4 7 8} } {3 4 7 8}
do_test trigger-6.5 { do_test trigger-6.5 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql {SELECT type, name FROM sqlite_master} execsql {SELECT type, name FROM sqlite_master}
} {view v1 table t2 trigger t2} } {view v1 table t2 trigger t2}
do_test trigger-6.6 { do_test trigger-6.6 {
@ -346,7 +346,7 @@ do_test trigger-6.7 {
} {3 4 7 8} } {3 4 7 8}
do_test trigger-6.8 { do_test trigger-6.8 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql {SELECT * FROM t2} execsql {SELECT * FROM t2}
} {3 4 7 8} } {3 4 7 8}

View File

@ -36,7 +36,7 @@ do_test trigger4-1.2 {
} {1 3} } {1 3}
do_test trigger4-1.3 { do_test trigger4-1.3 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
insert into test values(4,5,6); insert into test values(4,5,6);
select * from test1; select * from test1;
@ -66,7 +66,7 @@ do_test trigger4-2.2 {
} {1 3 4 6} } {1 3 4 6}
do_test trigger4-2.3 { do_test trigger4-2.3 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
update test set b=66 where id=4; update test set b=66 where id=4;
select * from test1; select * from test1;
@ -86,7 +86,7 @@ do_test trigger4-3.1 {
} {1 {no such table: main.test2}} } {1 {no such table: main.test2}}
do_test trigger4-3.2 { do_test trigger4-3.2 {
db close db close
sqlite db test.db sqlite3 db test.db
catchsql { catchsql {
insert into test values(7,8,9); insert into test values(7,8,9);
} }
@ -115,7 +115,7 @@ do_test trigger4-3.6 {
} {7 9} } {7 9}
do_test trigger4-3.7 { do_test trigger4-3.7 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
update test set b=99 where id=7; update test set b=99 where id=7;
select * from test2; select * from test2;

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing the VACUUM statement. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -96,7 +96,7 @@ do_test vacuum-2.1 {
} {1 {cannot VACUUM from within a transaction}} } {1 {cannot VACUUM from within a transaction}}
catch {db eval COMMIT} catch {db eval COMMIT}
do_test vacuum-2.2 { do_test vacuum-2.2 {
sqlite db2 test.db sqlite3 db2 test.db
execsql { execsql {
BEGIN; BEGIN;
CREATE TABLE t4 AS SELECT * FROM t1; CREATE TABLE t4 AS SELECT * FROM t1;
@ -125,7 +125,7 @@ do_test vacuum-3.1 {
db close db close
db2 close db2 close
file delete test.db file delete test.db
sqlite db test.db sqlite3 db test.db
execsql { execsql {
PRAGMA empty_result_callbacks=on; PRAGMA empty_result_callbacks=on;
VACUUM; VACUUM;
@ -136,7 +136,7 @@ do_test vacuum-3.1 {
# #
do_test vacuum-4.1 { do_test vacuum-4.1 {
db close db close
set DB [sqlite db test.db] set DB [sqlite3 db test.db]
set VM [sqlite3_prepare $DB {VACUUM} -1 TAIL] set VM [sqlite3_prepare $DB {VACUUM} -1 TAIL]
sqlite3_step $VM sqlite3_step $VM
} {SQLITE_DONE} } {SQLITE_DONE}
@ -150,7 +150,7 @@ do_test vacuum-4.2 {
do_test vacuum-5.1 { do_test vacuum-5.1 {
db close db close
file delete -force test.db file delete -force test.db
sqlite db test.db sqlite3 db test.db
catchsql { catchsql {
CREATE TABLE Test (TestID int primary key); CREATE TABLE Test (TestID int primary key);
INSERT INTO Test VALUES (NULL); INSERT INTO Test VALUES (NULL);

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing VIEW statements. # 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] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -46,7 +46,7 @@ do_test view-1.3 {
} {1 2 4 5 7 8} } {1 2 4 5 7 8}
do_test view-1.3.1 { do_test view-1.3.1 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT * FROM v1 ORDER BY a; SELECT * FROM v1 ORDER BY a;
} }
@ -80,7 +80,7 @@ do_test view-1.7 {
} {2 3 5 6 8 9} } {2 3 5 6 8 9}
do_test view-1.8 { do_test view-1.8 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT * FROM v1 ORDER BY a; SELECT * FROM v1 ORDER BY a;
} }
@ -265,7 +265,7 @@ do_test view-7.1 {
} {1 2 3} } {1 2 3}
do_test view-7.2 { do_test view-7.2 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT * FROM test; SELECT * FROM test;
} }
@ -281,7 +281,7 @@ do_test view-7.3 {
} {1 2 3} } {1 2 3}
do_test view-7.4 { do_test view-7.4 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT * FROM test; SELECT * FROM test;
} }
@ -297,7 +297,7 @@ do_test view-7.5 {
} {1 2 3} } {1 2 3}
do_test view-7.6 { do_test view-7.6 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT * FROM test; SELECT * FROM test;
} }
@ -311,7 +311,7 @@ do_test view-8.1 {
} {7 2 13 5 19 8 27 12} } {7 2 13 5 19 8 27 12}
do_test view-8.2 { do_test view-8.2 {
db close db close
sqlite db test.db sqlite3 db test.db
execsql { execsql {
SELECT * FROM v6 ORDER BY xyz; SELECT * FROM v6 ORDER BY xyz;
} }