| Index: third_party/sqlite/sqlite-src-3080704/test/shell4.test
|
| diff --git a/third_party/sqlite/sqlite-src-3070603/tool/shell4.test b/third_party/sqlite/sqlite-src-3080704/test/shell4.test
|
| similarity index 77%
|
| copy from third_party/sqlite/sqlite-src-3070603/tool/shell4.test
|
| copy to third_party/sqlite/sqlite-src-3080704/test/shell4.test
|
| index 085c279bb3148dc4ccda9a1c392613b78fc27e0d..c29faf00cfa18c085bdb862caa7d5693c4508cdb 100644
|
| --- a/third_party/sqlite/sqlite-src-3070603/tool/shell4.test
|
| +++ b/third_party/sqlite/sqlite-src-3080704/test/shell4.test
|
| @@ -19,33 +19,20 @@
|
| #
|
| # shell4-1.*: Basic tests specific to the "stats" command.
|
| #
|
| -
|
| -set CLI "./sqlite3"
|
| -
|
| -proc do_test {name cmd expected} {
|
| - puts -nonewline "$name ..."
|
| - set res [uplevel $cmd]
|
| - if {$res eq $expected} {
|
| - puts Ok
|
| - } else {
|
| - puts Error
|
| - puts " Got: $res"
|
| - puts " Expected: $expected"
|
| - exit
|
| - }
|
| +set testdir [file dirname $argv0]
|
| +source $testdir/tester.tcl
|
| +if {$tcl_platform(platform)=="windows"} {
|
| + set CLI "sqlite3.exe"
|
| +} else {
|
| + set CLI "./sqlite3"
|
| }
|
| -
|
| -proc catchcmd {db {cmd ""}} {
|
| - global CLI
|
| - set out [open cmds.txt w]
|
| - puts $out $cmd
|
| - close $out
|
| - set line "exec $CLI $db < cmds.txt"
|
| - set rc [catch { eval $line } msg]
|
| - list $rc $msg
|
| +if {![file executable $CLI]} {
|
| + finish_test
|
| + return
|
| }
|
| -
|
| -file delete -force test.db test.db.journal
|
| +db close
|
| +forcedelete test.db test.db-journal test.db-wal
|
| +sqlite3 db test.db
|
|
|
| #----------------------------------------------------------------------------
|
| # Test cases shell4-1.*: Tests specific to the "stats" command.
|
| @@ -76,7 +63,7 @@ do_test shell4-1.2.2 {
|
| # .stats ON|OFF Turn stats on or off
|
| do_test shell4-1.3.1 {
|
| catchcmd "test.db" ".stats"
|
| -} {1 {Error: unknown command or invalid arguments: "stats". Enter ".help" for help}}
|
| +} {1 {Usage: .stats on|off}}
|
| do_test shell4-1.3.2 {
|
| catchcmd "test.db" ".stats ON"
|
| } {0 {}}
|
| @@ -86,7 +73,7 @@ do_test shell4-1.3.3 {
|
| do_test shell4-1.3.4 {
|
| # too many arguments
|
| catchcmd "test.db" ".stats OFF BAD"
|
| -} {1 {Error: unknown command or invalid arguments: "stats". Enter ".help" for help}}
|
| +} {1 {Usage: .stats on|off}}
|
|
|
| # NB. whitespace is important
|
| do_test shell4-1.4.1 {
|
| @@ -126,4 +113,4 @@ SELECT 1;
|
| [regexp {Autoindex Inserts} $res]
|
| } {1 1 1}
|
|
|
| -puts "CLI tests completed successfully"
|
| +finish_test
|
|
|