]> git.saurik.com Git - redis.git/blobdiff - tests/support/test.tcl
tests for BLPOP/BRPOP via an option in the tcl client that defers reading the reply
[redis.git] / tests / support / test.tcl
index 988189bfa10887fbce8cbfe3fedf5290f1a75325..8849c9d6ab7501bf7ca173ec97c38f8e9482edba 100644 (file)
@@ -17,7 +17,7 @@ proc assert_equal {expected value} {
 }
 
 proc assert_error {pattern code} {
-    if {[catch $code error]} {
+    if {[catch {uplevel 1 $code} error]} {
         assert_match $pattern $error
     } else {
         puts "!! ERROR\nExpected an error but nothing was catched"