summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/type/string.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/type/string.tcl b/tests/unit/type/string.tcl
index 744937b35..7a5d56f82 100644
--- a/tests/unit/type/string.tcl
+++ b/tests/unit/type/string.tcl
@@ -438,6 +438,11 @@ start_server {tags {"string"}} {
assert_equal "" [r getrange mykey 0 -1]
}
+ test "GETRANGE against wrong key type" {
+ r lpush lkey1 "list"
+ assert_error {WRONGTYPE Operation against a key holding the wrong kind of value*} {r getrange lkey1 0 -1}
+ }
+
test "GETRANGE against string value" {
r set mykey "Hello World"
assert_equal "Hell" [r getrange mykey 0 3]