Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: third_party/sqlite/src/test/shell4.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/shell3.test ('k') | third_party/sqlite/src/test/shell5.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/sqlite/src/test/shell3.test ('k') | third_party/sqlite/src/test/shell5.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698