Add test case for APPEND command usage on integer value (#12429)

Add test coverage to validate object encoding update on APPEND command usage on a integer value
This commit is contained in:
Harkrishn Patro 2023-07-24 18:25:50 -07:00 committed by GitHub
parent 2495b90a64
commit 34b95f752c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}
}