| Index: third_party/sqlite/src/test/shell4.test
|
| diff --git a/third_party/sqlite/src/test/shell4.test b/third_party/sqlite/src/test/shell4.test
|
| index fcb0b2b715042bfe2f4984a01b208afc3b1545b6..88e5e69a288fef4393c4b401272d4791a5161004 100644
|
| --- a/third_party/sqlite/src/test/shell4.test
|
| +++ b/third_party/sqlite/src/test/shell4.test
|
| @@ -18,18 +18,11 @@
|
| #
|
| # shell4-1.*: Basic tests specific to the "stats" command.
|
| # shell4-2.*: Basic tests for ".trace"
|
| +# shell4-3.*: The ".read" command takes the shell out of interactive mode
|
| #
|
| set testdir [file dirname $argv0]
|
| source $testdir/tester.tcl
|
| -if {$tcl_platform(platform)=="windows"} {
|
| - set CLI "sqlite3.exe"
|
| -} else {
|
| - set CLI "./sqlite3"
|
| -}
|
| -if {![file executable $CLI]} {
|
| - finish_test
|
| - return
|
| -}
|
| +set CLI [test_find_cli]
|
| db close
|
| forcedelete test.db test.db-journal test.db-wal
|
| sqlite3 db test.db
|
| @@ -61,9 +54,9 @@ do_test shell4-1.2.2 {
|
| } {0}
|
|
|
| # .stats ON|OFF Turn stats on or off
|
| -do_test shell4-1.3.1 {
|
| - catchcmd "test.db" ".stats"
|
| -} {1 {Usage: .stats on|off}}
|
| +#do_test shell4-1.3.1 {
|
| +# catchcmd "test.db" ".stats"
|
| +#} {1 {Usage: .stats on|off}}
|
| do_test shell4-1.3.2 {
|
| catchcmd "test.db" ".stats ON"
|
| } {0 {}}
|
| @@ -73,7 +66,7 @@ do_test shell4-1.3.3 {
|
| do_test shell4-1.3.4 {
|
| # too many arguments
|
| catchcmd "test.db" ".stats OFF BAD"
|
| -} {1 {Usage: .stats on|off}}
|
| +} {1 {Usage: .stats ?on|off?}}
|
|
|
| # NB. whitespace is important
|
| do_test shell4-1.4.1 {
|
| @@ -132,5 +125,17 @@ do_test shell4-2.5 {
|
| } {0 {SELECT * FROM t1;}}
|
| }
|
|
|
| +do_test shell4-3.1 {
|
| + set fd [open t1.txt wb]
|
| + puts $fd "SELECT 'squirrel';"
|
| + close $fd
|
| + exec $::CLI :memory: --interactive ".read t1.txt"
|
| +} {squirrel}
|
| +do_test shell4-3.2 {
|
| + set fd [open t1.txt wb]
|
| + puts $fd "SELECT 'pound: \302\243';"
|
| + close $fd
|
| + exec $::CLI :memory: --interactive ".read t1.txt"
|
| +} {pound: £}
|
|
|
| finish_test
|
|
|