diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-07-29 13:31:24 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-07-29 13:31:24 +0200 |
commit | 86d392498ba41501f9508e03f6c830d7a5601631 (patch) | |
tree | 4ad69e49c13c6f53b18b8500a2cb874828c2c292 /tests/support/test.tcl | |
parent | cbf7e1070a5f3bcd8024dff481a2f729a2b5cf2f (diff) | |
download | redis-86d392498ba41501f9508e03f6c830d7a5601631.tar.gz |
ensure the value is swapped in before testing its encoding
Diffstat (limited to 'tests/support/test.tcl')
-rw-r--r-- | tests/support/test.tcl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/support/test.tcl b/tests/support/test.tcl index 2c1fc164f..298e4c779 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -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} { |