]>
git.saurik.com Git - redis.git/blob - tests/support/test.tcl
a7bcc80186af55390f962ff9a4d4da3554dee363
5 proc test
{name code okpattern
} {
7 puts -nonewline [format "#%03d %-68s " $::testnum $name]
9 if {[catch {set retval
[uplevel 1 $code]} error]} {
11 puts "\nCaught error: $error"
14 if {$okpattern eq
$retval ||
[string match
$okpattern $retval]} {
18 puts "!! ERROR expected\n'$okpattern'\nbut got\n'$retval'"
22 if {![string match
{*0 leaks
*} [exec leaks redis-server
]]} {
23 puts "--------- Test $::testnum LEAKED! --------"