/ Check-in [92fe70da]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the CLI test scripts for version 3.7.0.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:92fe70dadde2eb551518d69ac2eaa6a0151d7dfe
User & Date: drh 2010-07-19 15:01:44
Context
2010-07-20
18:59
Fix a race condition in os_unix.c that may occur when one thread is opening a connection to a shared-memory block and another is either closing or locking the same shared-memory. check-in: 3b7330c1 user: dan tags: trunk
2010-07-19
15:01
Update the CLI test scripts for version 3.7.0. check-in: 92fe70da user: drh tags: trunk
12:44
Use exit(255) instead of abort() in the tcl [sqlite_abort] test command. This stops testfixture from creating dozens of core files each time tests are run. check-in: aec9e131 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tool/shell1.test.

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
...
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
...
698
699
700
701
702
703
704
705
706
  list $rc \
       [regexp {Error: missing argument for option: -nullvalue} $res]
} {1 1}

# -version             show SQLite version
do_test shell1-1.16.1 {
  catchcmd "-version test.db" "" 
} {0 3.6.22}

#----------------------------------------------------------------------------
# Test cases shell1-2.*: Basic "dot" command token parsing.
#

# check first token handling
do_test shell1-2.1.1 {
................................................................................
  catchcmd "test.db" ".explain OFF"
} {0 {}}
do_test shell1-3.7.4 {
  # too many arguments
  catchcmd "test.db" ".explain OFF BAD"
} {1 {Error: unknown command or invalid arguments:  "explain". Enter ".help" for help}}

# .genfkey ?OPTIONS?     Options are:
#                          --no-drop: Do not drop old fkey triggers.
#                          --ignore-errors: Ignore tables with fkey errors
#                          --exec: Execute generated SQL immediately
#                        See file tool/genfkey.README in the source
#                        distribution for further information.
do_test shell1-3.8.1 {
  catchcmd "test.db" ".genfkey"
} {0 {}}
do_test shell1-3.8.2 {
  catchcmd "test.db" ".genfkey FOO"
} {1 {unknown option: FOO}}

# .header(s) ON|OFF      Turn display of headers on or off
do_test shell1-3.9.1 {
  catchcmd "test.db" ".header"
} {1 {Error: unknown command or invalid arguments:  "header". Enter ".help" for help}}
do_test shell1-3.9.2 {
  catchcmd "test.db" ".header ON"
................................................................................
  catchcmd "test.db" ".timer OFF"
} {0 {}}
do_test shell1-3.27.4 {
  # too many arguments
  catchcmd "test.db" ".timer OFF BAD"
} {1 {Error: unknown command or invalid arguments:  "timer". Enter ".help" for help}}


#







|







 







<
<
<
<
<
<
<
<
<
<
<
<







 







|
<
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
...
365
366
367
368
369
370
371












372
373
374
375
376
377
378
...
686
687
688
689
690
691
692
693

  list $rc \
       [regexp {Error: missing argument for option: -nullvalue} $res]
} {1 1}

# -version             show SQLite version
do_test shell1-1.16.1 {
  catchcmd "-version test.db" "" 
} {0 3.7.0}

#----------------------------------------------------------------------------
# Test cases shell1-2.*: Basic "dot" command token parsing.
#

# check first token handling
do_test shell1-2.1.1 {
................................................................................
  catchcmd "test.db" ".explain OFF"
} {0 {}}
do_test shell1-3.7.4 {
  # too many arguments
  catchcmd "test.db" ".explain OFF BAD"
} {1 {Error: unknown command or invalid arguments:  "explain". Enter ".help" for help}}














# .header(s) ON|OFF      Turn display of headers on or off
do_test shell1-3.9.1 {
  catchcmd "test.db" ".header"
} {1 {Error: unknown command or invalid arguments:  "header". Enter ".help" for help}}
do_test shell1-3.9.2 {
  catchcmd "test.db" ".header ON"
................................................................................
  catchcmd "test.db" ".timer OFF"
} {0 {}}
do_test shell1-3.27.4 {
  # too many arguments
  catchcmd "test.db" ".timer OFF BAD"
} {1 {Error: unknown command or invalid arguments:  "timer". Enter ".help" for help}}

puts "CLI tests completed successfully"

Changes to tool/shell2.test.

214
215
216
217
218
219
220


a
1
2
SELECT * FROM foo2;
b
1
2}}









>
>
214
215
216
217
218
219
220
221
222
a
1
2
SELECT * FROM foo2;
b
1
2}}

puts "CLI tests completed successfully"

Changes to tool/shell3.test.

117
118
119
120
121
122
123

  catchcmd "foo.db" ".tables"
} {0 {}}
do_test shell3-2.7 {
  catchcmd "foo.db" "CREATE TABLE"
} {1 {Error: incomplete SQL: CREATE TABLE}}










>
117
118
119
120
121
122
123
124
  catchcmd "foo.db" ".tables"
} {0 {}}
do_test shell3-2.7 {
  catchcmd "foo.db" "CREATE TABLE"
} {1 {Error: incomplete SQL: CREATE TABLE}}


puts "CLI tests completed successfully"