Permalink
Browse files

Merge remote branch 'pietern/list-test'

  • Loading branch information...
2 parents 673e1fb + 715c801 commit 0c7a9dec651aa15857da30b95cca7079490725ab @antirez antirez committed Jul 31, 2010
Showing with 102 additions and 90 deletions.
  1. +8 −3 tests/support/test.tcl
  2. +94 −87 tests/unit/type/list.tcl
View
@@ -33,9 +33,14 @@ proc assert_error {pattern code} {
}
proc assert_encoding {enc key} {
- # swapped out value doesn't have encoding, so swap in first
- r debug swapin $key
- assert_match "* encoding:$enc *" [r debug object $key]
+ # Swapped out values don't have an encoding, so make sure that
+ # the value is swapped in before checking the encoding.
+ set dbg [r debug object $key]
+ while {[string match "* swapped:*" $dbg]} {
+ [r debug swapin $key]
+ set dbg [r debug object $key]
+ }
+ assert_match "* encoding:$enc *" $dbg
}
proc assert_type {type key} {
Oops, something went wrong.

0 comments on commit 0c7a9de

Please sign in to comment.