mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
Simplify and cleanup the implementation of the new ASCII mode for the shell.
FossilOrigin-Name: 66a28f7abaeaf1ebe6e43d856af88ac64b1ff230
This commit is contained in:
@@ -421,13 +421,13 @@ do_test shell1-3.12.3 {
|
||||
} {1 {Usage: .indices ?LIKE-PATTERN?}}
|
||||
|
||||
# .mode MODE ?TABLE? Set output mode where MODE is one of:
|
||||
# ascii Columns/rows delimited with 0x1F and 0x1E
|
||||
# ascii Columns/rows delimited by 0x1F and 0x1E
|
||||
# csv Comma-separated values
|
||||
# column Left-aligned columns. (See .width)
|
||||
# html HTML <table> code
|
||||
# insert SQL insert statements for TABLE
|
||||
# line One value per line
|
||||
# list Values delimited by .separator string
|
||||
# list Values delimited by .separator strings
|
||||
# tabs Tab-separated values
|
||||
# tcl TCL list elements
|
||||
do_test shell1-3.13.1 {
|
||||
@@ -590,7 +590,7 @@ db eval {DROP VIEW v1; DROP VIEW v2; DROP TABLE t1;}
|
||||
# .separator STRING Change column separator used by output and .import
|
||||
do_test shell1-3.22.1 {
|
||||
catchcmd "test.db" ".separator"
|
||||
} {1 {Usage: .separator SEPARATOR ?NEWLINE?}}
|
||||
} {1 {Usage: .separator COL ?ROW?}}
|
||||
do_test shell1-3.22.2 {
|
||||
catchcmd "test.db" ".separator FOO"
|
||||
} {0 {}}
|
||||
@@ -600,7 +600,7 @@ do_test shell1-3.22.3 {
|
||||
do_test shell1-3.22.4 {
|
||||
# too many arguments
|
||||
catchcmd "test.db" ".separator FOO BAD BAD2"
|
||||
} {1 {Usage: .separator SEPARATOR ?NEWLINE?}}
|
||||
} {1 {Usage: .separator COL ?ROW?}}
|
||||
|
||||
# .show Show the current values for various settings
|
||||
do_test shell1-3.23.1 {
|
||||
@@ -613,10 +613,9 @@ do_test shell1-3.23.1 {
|
||||
[regexp {output:} $res] \
|
||||
[regexp {colseparator:} $res] \
|
||||
[regexp {rowseparator:} $res] \
|
||||
[regexp {newline:} $res] \
|
||||
[regexp {stats:} $res] \
|
||||
[regexp {width:} $res]
|
||||
} {1 1 1 1 1 1 1 1 1 1 1}
|
||||
} {1 1 1 1 1 1 1 1 1 1}
|
||||
do_test shell1-3.23.2 {
|
||||
# too many arguments
|
||||
catchcmd "test.db" ".show BAD"
|
||||
@@ -816,28 +815,4 @@ do_test shell1-4.6 {
|
||||
";"
|
||||
"$"} 7}
|
||||
|
||||
# .colseparator STRING Change column separator used by output and .import
|
||||
do_test shell1-5.1.1 {
|
||||
catchcmd "test.db" ".colseparator"
|
||||
} {1 {Usage: .colseparator STRING}}
|
||||
do_test shell1-5.1.2 {
|
||||
catchcmd "test.db" ".colseparator FOO"
|
||||
} {0 {}}
|
||||
do_test shell1-5.1.3 {
|
||||
# too many arguments
|
||||
catchcmd "test.db" ".colseparator FOO BAD"
|
||||
} {1 {Usage: .colseparator STRING}}
|
||||
|
||||
# .rowseparator STRING Change row separator used by output and .import
|
||||
do_test shell1-6.1.1 {
|
||||
catchcmd "test.db" ".rowseparator"
|
||||
} {1 {Usage: .rowseparator STRING}}
|
||||
do_test shell1-6.1.2 {
|
||||
catchcmd "test.db" ".rowseparator FOO"
|
||||
} {0 {}}
|
||||
do_test shell1-6.1.3 {
|
||||
# too many arguments
|
||||
catchcmd "test.db" ".rowseparator FOO BAD"
|
||||
} {1 {Usage: .rowseparator STRING}}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user