3
# The author disclaims copyright to this source code. In place of
4
# a legal notice, here is a blessing:
6
# May you do good and not evil.
7
# May you find forgiveness for yourself and forgive others.
8
# May you share freely, never taking more than you give.
10
#***********************************************************************
12
# The focus of this file is testing the CLI shell tool.
14
# $Id: shell1.test,v 1.7 2009/07/17 16:54:48 shaneh Exp $
19
# shell1-1.*: Basic command line option handling.
20
# shell1-2.*: Basic "dot" command token parsing.
21
# shell1-3.*: Basic test that "dot" command can be called.
24
package require sqlite3
28
proc do_test {name cmd expected} {
29
puts -nonewline "$name ..."
30
set res [uplevel $cmd]
31
if {$res eq $expected} {
36
puts " Expected: $expected"
42
uplevel [list db eval $sql]
46
set rc [catch {uplevel [list db eval $sql]} msg]
50
proc catchcmd {db cmd} {
52
set out [open cmds.txt w]
55
set line "exec $CLI $db < cmds.txt"
56
set rc [catch { eval $line } msg]
60
file delete -force test.db test.db.journal
63
#----------------------------------------------------------------------------
64
# Test cases shell1-1.*: Basic command line option handling.
68
do_test shell1-1.1.1 {
69
set res [catchcmd "-bad test.db" ""]
70
set rc [lindex $res 0]
72
[regexp {Error: unknown option: -bad} $res]
74
# error on extra options
75
do_test shell1-1.1.2 {
76
set res [catchcmd "-bad test.db \"select 3\" \"select 4\"" ""]
77
set rc [lindex $res 0]
79
[regexp {Error: too many options: "select 4"} $res]
81
# error on extra options
82
do_test shell1-1.3.2 {
83
set res [catchcmd "-bad FOO test.db BAD" ".quit"]
84
set rc [lindex $res 0]
86
[regexp {Error: too many options: "BAD"} $res]
90
do_test shell1-1.2.1 {
91
set res [catchcmd "-help test.db" ""]
92
set rc [lindex $res 0]
94
[regexp {Usage} $res] \
95
[regexp {\-init} $res] \
96
[regexp {\-version} $res]
99
# -init filename read/process named file
100
do_test shell1-1.3.1 {
101
catchcmd "-init FOO test.db" ""
103
do_test shell1-1.3.2 {
104
set res [catchcmd "-init FOO test.db .quit BAD" ""]
105
set rc [lindex $res 0]
107
[regexp {Error: too many options: "BAD"} $res]
110
# -echo print commands before execution
111
do_test shell1-1.4.1 {
112
catchcmd "-echo test.db" ""
115
# -[no]header turn headers on or off
116
do_test shell1-1.5.1 {
117
catchcmd "-header test.db" ""
119
do_test shell1-1.5.2 {
120
catchcmd "-noheader test.db" ""
123
# -bail stop after hitting an error
124
do_test shell1-1.6.1 {
125
catchcmd "-bail test.db" ""
128
# -interactive force interactive I/O
129
do_test shell1-1.7.1 {
130
set res [catchcmd "-interactive test.db" ".quit"]
131
set rc [lindex $res 0]
133
[regexp {SQLite version} $res] \
134
[regexp {Enter SQL statements} $res]
137
# -batch force batch I/O
138
do_test shell1-1.8.1 {
139
catchcmd "-batch test.db" ""
142
# -column set output mode to 'column'
143
do_test shell1-1.9.1 {
144
catchcmd "-column test.db" ""
147
# -csv set output mode to 'csv'
148
do_test shell1-1.10.1 {
149
catchcmd "-csv test.db" ""
152
# -html set output mode to HTML
153
do_test shell1-1.11.1 {
154
catchcmd "-html test.db" ""
157
# -line set output mode to 'line'
158
do_test shell1-1.12.1 {
159
catchcmd "-line test.db" ""
162
# -list set output mode to 'list'
163
do_test shell1-1.13.1 {
164
catchcmd "-list test.db" ""
167
# -separator 'x' set output field separator (|)
168
do_test shell1-1.14.1 {
169
catchcmd "-separator 'x' test.db" ""
171
do_test shell1-1.14.2 {
172
catchcmd "-separator x test.db" ""
174
do_test shell1-1.14.3 {
175
set res [catchcmd "-separator" ""]
176
set rc [lindex $res 0]
178
[regexp {Error: missing argument for option: -separator} $res]
181
# -nullvalue 'text' set text string for NULL values
182
do_test shell1-1.15.1 {
183
catchcmd "-nullvalue 'x' test.db" ""
185
do_test shell1-1.15.2 {
186
catchcmd "-nullvalue x test.db" ""
188
do_test shell1-1.15.3 {
189
set res [catchcmd "-nullvalue" ""]
190
set rc [lindex $res 0]
192
[regexp {Error: missing argument for option: -nullvalue} $res]
195
# -version show SQLite version
196
do_test shell1-1.16.1 {
197
catchcmd "-version test.db" ""
200
#----------------------------------------------------------------------------
201
# Test cases shell1-2.*: Basic "dot" command token parsing.
204
# check first token handling
205
do_test shell1-2.1.1 {
206
catchcmd " test.db" ".foo"
207
} {1 {Error: unknown command or invalid arguments: "foo". Enter ".help" for help}}
208
do_test shell1-2.1.2 {
209
catchcmd " test.db" ".\"foo OFF\""
210
} {1 {Error: unknown command or invalid arguments: "foo OFF". Enter ".help" for help}}
211
do_test shell1-2.1.3 {
212
catchcmd " test.db" ".\'foo OFF\'"
213
} {1 {Error: unknown command or invalid arguments: "foo OFF". Enter ".help" for help}}
216
do_test shell1-2.2.1 {
217
catchcmd " test.db" ".\"foo OFF"
218
} {1 {Error: unknown command or invalid arguments: "foo OFF". Enter ".help" for help}}
219
do_test shell1-2.2.2 {
220
catchcmd " test.db" ".\'foo OFF"
221
} {1 {Error: unknown command or invalid arguments: "foo OFF". Enter ".help" for help}}
222
do_test shell1-2.2.3 {
223
catchcmd " test.db" ".explain \"OFF"
225
do_test shell1-2.2.4 {
226
catchcmd " test.db" ".explain \'OFF"
228
do_test shell1-2.2.5 {
229
catchcmd " test.db" ".mode \"insert FOO"
230
} {1 {Error: mode should be one of: column csv html insert line list tabs tcl}}
231
do_test shell1-2.2.6 {
232
catchcmd " test.db" ".mode \'insert FOO"
233
} {1 {Error: mode should be one of: column csv html insert line list tabs tcl}}
235
# check multiple tokens, and quoted tokens
236
do_test shell1-2.3.1 {
237
catchcmd " test.db" ".explain 1"
239
do_test shell1-2.3.2 {
240
catchcmd " test.db" ".explain on"
242
do_test shell1-2.3.3 {
243
catchcmd " test.db" ".explain \"1 2 3\""
245
do_test shell1-2.3.4 {
246
catchcmd " test.db" ".explain \"OFF\""
248
do_test shell1-2.3.5 {
249
catchcmd " test.db" ".\'explain\' \'OFF\'"
251
do_test shell1-2.3.6 {
252
catchcmd " test.db" ".explain \'OFF\'"
254
do_test shell1-2.3.7 {
255
catchcmd " test.db" ".\'explain\' \'OFF\'"
258
# check quoted args are unquoted
259
do_test shell1-2.4.1 {
260
catchcmd " test.db" ".mode FOO"
261
} {1 {Error: mode should be one of: column csv html insert line list tabs tcl}}
262
do_test shell1-2.4.2 {
263
catchcmd " test.db" ".mode csv"
265
do_test shell1-2.4.2 {
266
catchcmd " test.db" ".mode \"csv\""
270
#----------------------------------------------------------------------------
271
# Test cases shell1-3.*: Basic test that "dot" command can be called.
274
# .backup ?DB? FILE Backup DB (default "main") to FILE
275
do_test shell1-3.1.1 {
276
catchcmd " test.db" ".backup"
277
} {1 {Error: unknown command or invalid arguments: "backup". Enter ".help" for help}}
278
do_test shell1-3.1.2 {
279
# catchcmd " test.db" ".backup FOO"
280
#TBD!!! this asserts currently
282
do_test shell1-3.1.3 {
283
catchcmd " test.db" ".backup FOO BAR"
284
} {1 {Error: unknown database FOO}}
285
do_test shell1-3.1.4 {
287
catchcmd " test.db" ".backup FOO BAR BAD"
288
} {1 {Error: unknown command or invalid arguments: "backup". Enter ".help" for help}}
290
# .bail ON|OFF Stop after hitting an error. Default OFF
291
do_test shell1-3.2.1 {
292
catchcmd " test.db" ".bail"
293
} {1 {Error: unknown command or invalid arguments: "bail". Enter ".help" for help}}
294
do_test shell1-3.2.2 {
295
catchcmd " test.db" ".bail ON"
297
do_test shell1-3.2.3 {
298
catchcmd " test.db" ".bail OFF"
300
do_test shell1-3.2.4 {
302
catchcmd " test.db" ".bail OFF BAD"
303
} {1 {Error: unknown command or invalid arguments: "bail". Enter ".help" for help}}
305
# .databases List names and files of attached databases
306
do_test shell1-3.3.1 {
307
set res [catchcmd " test.db" ".databases"]
308
regexp {0.*main.*test\.db} $res
310
do_test shell1-3.3.2 {
312
catchcmd " test.db" ".databases BAD"
313
} {1 {Error: unknown command or invalid arguments: "databases". Enter ".help" for help}}
315
# .dump ?TABLE? ... Dump the database in an SQL text format
316
# If TABLE specified, only dump tables matching
317
# LIKE pattern TABLE.
318
do_test shell1-3.4.1 {
319
set res [catchcmd " test.db" ".dump"]
320
list [regexp {BEGIN TRANSACTION;} $res] \
321
[regexp {COMMIT;} $res]
323
do_test shell1-3.4.2 {
324
set res [catchcmd " test.db" ".dump FOO"]
325
list [regexp {BEGIN TRANSACTION;} $res] \
326
[regexp {COMMIT;} $res]
328
do_test shell1-3.4.3 {
330
catchcmd " test.db" ".dump FOO BAD"
331
} {1 {Error: unknown command or invalid arguments: "dump". Enter ".help" for help}}
333
# .echo ON|OFF Turn command echo on or off
334
do_test shell1-3.5.1 {
335
catchcmd " test.db" ".echo"
336
} {1 {Error: unknown command or invalid arguments: "echo". Enter ".help" for help}}
337
do_test shell1-3.5.2 {
338
catchcmd " test.db" ".echo ON"
340
do_test shell1-3.5.3 {
341
catchcmd " test.db" ".echo OFF"
343
do_test shell1-3.5.4 {
345
catchcmd " test.db" ".echo OFF BAD"
346
} {1 {Error: unknown command or invalid arguments: "echo". Enter ".help" for help}}
348
# .exit Exit this program
349
do_test shell1-3.6.1 {
350
catchcmd " test.db" ".exit"
352
do_test shell1-3.6.2 {
354
catchcmd " test.db" ".exit BAD"
355
} {1 {Error: unknown command or invalid arguments: "exit". Enter ".help" for help}}
357
# .explain ON|OFF Turn output mode suitable for EXPLAIN on or off.
358
do_test shell1-3.7.1 {
359
catchcmd " test.db" ".explain"
360
# explain is the exception to the booleans. without an option, it turns it on.
362
do_test shell1-3.7.2 {
363
catchcmd " test.db" ".explain ON"
365
do_test shell1-3.7.3 {
366
catchcmd " test.db" ".explain OFF"
368
do_test shell1-3.7.4 {
370
catchcmd " test.db" ".explain OFF BAD"
371
} {1 {Error: unknown command or invalid arguments: "explain". Enter ".help" for help}}
373
# .genfkey ?OPTIONS? Options are:
374
# --no-drop: Do not drop old fkey triggers.
375
# --ignore-errors: Ignore tables with fkey errors
376
# --exec: Execute generated SQL immediately
377
# See file tool/genfkey.README in the source
378
# distribution for further information.
379
do_test shell1-3.8.1 {
380
catchcmd " test.db" ".genfkey"
382
do_test shell1-3.8.2 {
383
catchcmd " test.db" ".genfkey FOO"
384
} {1 {unknown option: FOO}}
386
# .header(s) ON|OFF Turn display of headers on or off
387
do_test shell1-3.9.1 {
388
catchcmd " test.db" ".header"
389
} {1 {Error: unknown command or invalid arguments: "header". Enter ".help" for help}}
390
do_test shell1-3.9.2 {
391
catchcmd " test.db" ".header ON"
393
do_test shell1-3.9.3 {
394
catchcmd " test.db" ".header OFF"
396
do_test shell1-3.9.4 {
398
catchcmd " test.db" ".header OFF BAD"
399
} {1 {Error: unknown command or invalid arguments: "header". Enter ".help" for help}}
401
do_test shell1-3.9.5 {
402
catchcmd " test.db" ".headers"
403
} {1 {Error: unknown command or invalid arguments: "headers". Enter ".help" for help}}
404
do_test shell1-3.9.6 {
405
catchcmd " test.db" ".headers ON"
407
do_test shell1-3.9.7 {
408
catchcmd " test.db" ".headers OFF"
410
do_test shell1-3.9.8 {
412
catchcmd " test.db" ".headers OFF BAD"
413
} {1 {Error: unknown command or invalid arguments: "headers". Enter ".help" for help}}
415
# .help Show this message
416
do_test shell1-3.10.1 {
417
set res [catchcmd " test.db" ".help"]
418
# look for a few of the possible help commands
419
list [regexp {.help} $res] \
420
[regexp {.quit} $res] \
421
[regexp {.show} $res]
423
do_test shell1-3.10.2 {
424
# we allow .help to take extra args (it is help after all)
425
set res [catchcmd " test.db" ".help BAD"]
426
# look for a few of the possible help commands
427
list [regexp {.help} $res] \
428
[regexp {.quit} $res] \
429
[regexp {.show} $res]
432
# .import FILE TABLE Import data from FILE into TABLE
433
do_test shell1-3.11.1 {
434
catchcmd " test.db" ".import"
435
} {1 {Error: unknown command or invalid arguments: "import". Enter ".help" for help}}
436
do_test shell1-3.11.2 {
437
catchcmd " test.db" ".import FOO"
438
} {1 {Error: unknown command or invalid arguments: "import". Enter ".help" for help}}
439
do_test shell1-3.11.2 {
440
catchcmd " test.db" ".import FOO BAR"
441
} {1 {Error: no such table: BAR}}
442
do_test shell1-3.11.3 {
444
catchcmd " test.db" ".import FOO BAR BAD"
445
} {1 {Error: unknown command or invalid arguments: "import". Enter ".help" for help}}
447
# .indices ?TABLE? Show names of all indices
448
# If TABLE specified, only show indices for tables
449
# matching LIKE pattern TABLE.
450
do_test shell1-3.12.1 {
451
catchcmd " test.db" ".indices"
453
do_test shell1-3.12.2 {
454
catchcmd " test.db" ".indices FOO"
456
do_test shell1-3.12.3 {
458
catchcmd " test.db" ".indices FOO BAD"
459
} {1 {Error: unknown command or invalid arguments: "indices". Enter ".help" for help}}
461
# .mode MODE ?TABLE? Set output mode where MODE is one of:
462
# csv Comma-separated values
463
# column Left-aligned columns. (See .width)
464
# html HTML <table> code
465
# insert SQL insert statements for TABLE
466
# line One value per line
467
# list Values delimited by .separator string
468
# tabs Tab-separated values
469
# tcl TCL list elements
470
do_test shell1-3.13.1 {
471
catchcmd " test.db" ".mode"
472
} {1 {Error: unknown command or invalid arguments: "mode". Enter ".help" for help}}
473
do_test shell1-3.13.2 {
474
catchcmd " test.db" ".mode FOO"
475
} {1 {Error: mode should be one of: column csv html insert line list tabs tcl}}
476
do_test shell1-3.13.3 {
477
catchcmd " test.db" ".mode csv"
479
do_test shell1-3.13.4 {
480
catchcmd " test.db" ".mode column"
482
do_test shell1-3.13.5 {
483
catchcmd " test.db" ".mode html"
485
do_test shell1-3.13.6 {
486
catchcmd " test.db" ".mode insert"
488
do_test shell1-3.13.7 {
489
catchcmd " test.db" ".mode line"
491
do_test shell1-3.13.8 {
492
catchcmd " test.db" ".mode list"
494
do_test shell1-3.13.9 {
495
catchcmd " test.db" ".mode tabs"
497
do_test shell1-3.13.10 {
498
catchcmd " test.db" ".mode tcl"
500
do_test shell1-3.13.11 {
502
catchcmd " test.db" ".mode tcl BAD"
503
} {1 {Error: invalid arguments: "BAD". Enter ".help" for help}}
505
# don't allow partial mode type matches
506
do_test shell1-3.13.12 {
507
catchcmd " test.db" ".mode l"
508
} {1 {Error: mode should be one of: column csv html insert line list tabs tcl}}
509
do_test shell1-3.13.13 {
510
catchcmd " test.db" ".mode li"
511
} {1 {Error: mode should be one of: column csv html insert line list tabs tcl}}
512
do_test shell1-3.13.14 {
513
catchcmd " test.db" ".mode lin"
514
} {1 {Error: mode should be one of: column csv html insert line list tabs tcl}}
516
# .nullvalue STRING Print STRING in place of NULL values
517
do_test shell1-3.14.1 {
518
catchcmd " test.db" ".nullvalue"
519
} {1 {Error: unknown command or invalid arguments: "nullvalue". Enter ".help" for help}}
520
do_test shell1-3.14.2 {
521
catchcmd " test.db" ".nullvalue FOO"
523
do_test shell1-3.14.3 {
525
catchcmd " test.db" ".nullvalue FOO BAD"
526
} {1 {Error: unknown command or invalid arguments: "nullvalue". Enter ".help" for help}}
528
# .output FILENAME Send output to FILENAME
529
do_test shell1-3.15.1 {
530
catchcmd " test.db" ".output"
531
} {1 {Error: unknown command or invalid arguments: "output". Enter ".help" for help}}
532
do_test shell1-3.15.2 {
533
catchcmd " test.db" ".output FOO"
535
do_test shell1-3.15.3 {
537
catchcmd " test.db" ".output FOO BAD"
538
} {1 {Error: unknown command or invalid arguments: "output". Enter ".help" for help}}
540
# .output stdout Send output to the screen
541
do_test shell1-3.16.1 {
542
catchcmd " test.db" ".output stdout"
544
do_test shell1-3.16.2 {
546
catchcmd " test.db" ".output stdout BAD"
547
} {1 {Error: unknown command or invalid arguments: "output". Enter ".help" for help}}
549
# .prompt MAIN CONTINUE Replace the standard prompts
550
do_test shell1-3.17.1 {
551
catchcmd " test.db" ".prompt"
552
} {1 {Error: unknown command or invalid arguments: "prompt". Enter ".help" for help}}
553
do_test shell1-3.17.2 {
554
catchcmd " test.db" ".prompt FOO"
556
do_test shell1-3.17.3 {
557
catchcmd " test.db" ".prompt FOO BAR"
559
do_test shell1-3.17.4 {
561
catchcmd " test.db" ".prompt FOO BAR BAD"
562
} {1 {Error: unknown command or invalid arguments: "prompt". Enter ".help" for help}}
564
# .quit Exit this program
565
do_test shell1-3.18.1 {
566
catchcmd " test.db" ".quit"
568
do_test shell1-3.18.2 {
570
catchcmd " test.db" ".quit BAD"
571
} {1 {Error: unknown command or invalid arguments: "quit". Enter ".help" for help}}
573
# .read FILENAME Execute SQL in FILENAME
574
do_test shell1-3.19.1 {
575
catchcmd " test.db" ".read"
576
} {1 {Error: unknown command or invalid arguments: "read". Enter ".help" for help}}
577
do_test shell1-3.19.2 {
578
file delete -force FOO
579
catchcmd " test.db" ".read FOO"
580
} {1 {Error: cannot open "FOO"}}
581
do_test shell1-3.19.3 {
583
catchcmd " test.db" ".read FOO BAD"
584
} {1 {Error: unknown command or invalid arguments: "read". Enter ".help" for help}}
586
# .restore ?DB? FILE Restore content of DB (default "main") from FILE
587
do_test shell1-3.20.1 {
588
catchcmd " test.db" ".restore"
589
} {1 {Error: unknown command or invalid arguments: "restore". Enter ".help" for help}}
590
do_test shell1-3.20.2 {
591
# catchcmd " test.db" ".restore FOO"
592
#TBD!!! this asserts currently
594
do_test shell1-3.20.3 {
595
catchcmd " test.db" ".restore FOO BAR"
596
} {1 {Error: unknown database FOO}}
597
do_test shell1-3.20.4 {
599
catchcmd " test.db" ".restore FOO BAR BAD"
600
} {1 {Error: unknown command or invalid arguments: "restore". Enter ".help" for help}}
602
# .schema ?TABLE? Show the CREATE statements
603
# If TABLE specified, only show tables matching
604
# LIKE pattern TABLE.
605
do_test shell1-3.21.1 {
606
catchcmd " test.db" ".schema"
608
do_test shell1-3.21.2 {
609
catchcmd " test.db" ".schema FOO"
611
do_test shell1-3.21.3 {
613
catchcmd " test.db" ".schema FOO BAD"
614
} {1 {Error: unknown command or invalid arguments: "schema". Enter ".help" for help}}
616
# .separator STRING Change separator used by output mode and .import
617
do_test shell1-3.22.1 {
618
catchcmd " test.db" ".separator"
619
} {1 {Error: unknown command or invalid arguments: "separator". Enter ".help" for help}}
620
do_test shell1-3.22.2 {
621
catchcmd " test.db" ".separator FOO"
623
do_test shell1-3.22.3 {
625
catchcmd " test.db" ".separator FOO BAD"
626
} {1 {Error: unknown command or invalid arguments: "separator". Enter ".help" for help}}
628
# .show Show the current values for various settings
629
do_test shell1-3.23.1 {
630
set res [catchcmd " test.db" ".show"]
631
list [regexp {echo:} $res] \
632
[regexp {explain:} $res] \
633
[regexp {headers:} $res] \
634
[regexp {mode:} $res] \
635
[regexp {nullvalue:} $res] \
636
[regexp {output:} $res] \
637
[regexp {separator:} $res] \
638
[regexp {width:} $res]
640
do_test shell1-3.23.2 {
642
catchcmd " test.db" ".show BAD"
643
} {1 {Error: unknown command or invalid arguments: "show". Enter ".help" for help}}
645
# .tables ?TABLE? List names of tables
646
# If TABLE specified, only list tables matching
647
# LIKE pattern TABLE.
648
do_test shell1-3.24.1 {
649
catchcmd " test.db" ".tables"
651
do_test shell1-3.24.2 {
652
catchcmd " test.db" ".tables FOO"
654
do_test shell1-3.24.3 {
656
catchcmd " test.db" ".tables FOO BAD"
657
} {1 {Error: unknown command or invalid arguments: "tables". Enter ".help" for help}}
659
# .timeout MS Try opening locked tables for MS milliseconds
660
do_test shell1-3.25.1 {
661
catchcmd " test.db" ".timeout"
662
} {1 {Error: unknown command or invalid arguments: "timeout". Enter ".help" for help}}
663
do_test shell1-3.25.2 {
664
catchcmd " test.db" ".timeout zzz"
665
# this should be treated the same as a '0' timeout
667
do_test shell1-3.25.3 {
668
catchcmd " test.db" ".timeout 1"
670
do_test shell1-3.25.4 {
672
catchcmd " test.db" ".timeout 1 BAD"
673
} {1 {Error: unknown command or invalid arguments: "timeout". Enter ".help" for help}}
675
# .width NUM NUM ... Set column widths for "column" mode
676
do_test shell1-3.26.1 {
677
catchcmd " test.db" ".width"
678
} {1 {Error: unknown command or invalid arguments: "width". Enter ".help" for help}}
679
do_test shell1-3.26.2 {
680
catchcmd " test.db" ".width xxx"
681
# this should be treated the same as a '0' width for col 1
683
do_test shell1-3.26.3 {
684
catchcmd " test.db" ".width xxx yyy"
685
# this should be treated the same as a '0' width for col 1 and 2
687
do_test shell1-3.26.4 {
688
catchcmd " test.db" ".width 1 1"
689
# this should be treated the same as a '1' width for col 1 and 2
692
# .timer ON|OFF Turn the CPU timer measurement on or off
693
do_test shell1-3.27.1 {
694
catchcmd " test.db" ".timer"
695
} {1 {Error: unknown command or invalid arguments: "timer". Enter ".help" for help}}
696
do_test shell1-3.27.2 {
697
catchcmd " test.db" ".timer ON"
699
do_test shell1-3.27.3 {
700
catchcmd " test.db" ".timer OFF"
702
do_test shell1-3.27.4 {
704
catchcmd " test.db" ".timer OFF BAD"
705
} {1 {Error: unknown command or invalid arguments: "timer". Enter ".help" for help}}