]>
git.saurik.com Git - redis.git/blob - tests/support/test.tcl
5 proc test
{name code okpattern
} {
7 # if {$::testnum < $::first || $::testnum > $::last} return
8 puts -nonewline [format "#%03d %-68s " $::testnum $name]
10 if {[catch {set retval
[uplevel 1 $code]} error]} {
11 puts "ERROR\n\nLogged warnings:"
12 foreach file [glob tests
/tmp
/server.
[pid].
*/stdout
] {
13 set warnings
[warnings_from_file
$file]
14 if {[string length
$warnings] > 0} {
20 if {$okpattern eq
$retval ||
[string match
$okpattern $retval]} {
24 puts "!! ERROR expected\n'$okpattern'\nbut got\n'$retval'"
28 if {![string match
{*0 leaks
*} [exec leaks redis-server
]]} {
29 puts "--------- Test $::testnum LEAKED! --------"