1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-21 13:38:01 +03:00
Files
sqlite/test/shellB.test
drh d5ee8aa625 Fix various bugs and compiler warnings. All tests now passing on linux, mac,
and windows.  More testing needed, though.

FossilOrigin-Name: 2220cb70c2f1ee30dcdf917a20feacdfcb3789433d0645fea626fd4c5cf0d099
2025-11-14 13:07:45 +00:00

45 lines
1.3 KiB
Plaintext

# 2025-11-12
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# TESTRUNNER: shell
#
# Test cases for the command-line shell using the new ".output memory"
# feature.
#
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set CLI [test_cli_invocation]
# Run an instance of the CLI on the file $name.
# Capture the number of test cases and the number of
# errors and increment the counts.
#
proc do_clitest {name} {
set mapping [list <NAME> $::testdir/$name <CLI> $::CLI]
set script [string map $mapping {
catch {exec <CLI> :memory: ".read <NAME>" 2>@stdout} res
set ntest 0
set nerr 999
regexp {.*(\d+) tests? run with (\d+) errors?} $res all ntest nerr
set_test_counter count [expr {[set_test_counter count]+$ntest-1}]
set_test_counter errors [expr {[set_test_counter errors]+$nerr}]
if {$nerr==0} {set res "error count: 0"}
set res
}]
# puts $script
do_test shellB-$name $script {error count: 0}
}
do_clitest modeA.clitest
finish_test