diff --git a/tests/unit/type/string.tcl b/tests/unit/type/string.tcl index 5a8af7b53..94702ec3d 100644 --- a/tests/unit/type/string.tcl +++ b/tests/unit/type/string.tcl @@ -656,4 +656,19 @@ if {[string match {*jemalloc*} [s mem_allocator]]} { } } } + + test {APPEND modifies the encoding from int to raw} { + r del foo + r set foo 1 + assert_encoding "int" foo + r append foo 2 + + set res {} + lappend res [r get foo] + assert_encoding "raw" foo + + r set bar 12 + assert_encoding "int" bar + lappend res [r get bar] + } {12 12} }