/
niceSOFT
/
sqlite
Обзор
Документация
Войти
/
niceSOFT
/
sqlite
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/shellB.test
57 строк
2 KB
drh
Fix the sha1() extension function so that it interprets zero-length
29 июл 2026, 13:28
29 июл 2026, 13:28
67cfb59
Код
Авторство
О чём код?
# 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 newly renovated # ".testcase" and ".check" commands. # 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 args} { set mapping [list <NAME> $::testdir/$name <CLI> $::CLI <ARGS> $args] set script [string map $mapping { catch {exec <CLI> <ARGS> :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.sql do_clitest dblwidth-a.sql do_clitest vt100-a.sql do_clitest regexp1.sql do_clitest imposter1.sql do_clitest sha1.sql ifcapable vtab { do_clitest dotcmd01.sql do_clitest import01.sql do_clitest intck01.sql --unsafe-testing } do_clitest fptest01.sql unset -nocomplain ::env(SQLITE_PS1) unset -nocomplain ::env(SQLITE_PS2) do_clitest shell-prompt.sql finish_test