summaryrefslogtreecommitdiff
path: root/tests/unit/moduleapi/reply.tcl
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2023-05-15 13:08:15 +0300
committerGitHub <noreply@github.com>2023-05-15 13:08:15 +0300
commita51eb05b1895babb17c37c36b963e2bcbd5496d5 (patch)
tree7be24b09e0a5621a03e9f9ffe9ef27fcb44d8345 /tests/unit/moduleapi/reply.tcl
parente26a769d9627ebecb8607375580970a740348956 (diff)
parent986dbf716e0cb904c80bb444635cea3242859cc1 (diff)
downloadredis-7.2.tar.gz
Release Redis 7.2 RC27.2-rc27.2
Diffstat (limited to 'tests/unit/moduleapi/reply.tcl')
-rw-r--r--tests/unit/moduleapi/reply.tcl11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/moduleapi/reply.tcl b/tests/unit/moduleapi/reply.tcl
index 291253d3c..547be21c0 100644
--- a/tests/unit/moduleapi/reply.tcl
+++ b/tests/unit/moduleapi/reply.tcl
@@ -126,6 +126,17 @@ start_server {tags {"modules"}} {
assert_match "An error" $e
}
+ test "RESP$proto: RM_ReplyWithErrorFormat: error format reply" {
+ catch {r rw.error_format "An error: %s" foo} e
+ assert_match "ERR An error: foo" $e
+
+ catch {r rw.error_format "-ERR An error: %s" foo2} e
+ assert_match "ERR An error: foo2" $e
+
+ catch {r rw.error_format "-WRONGTYPE A type error: %s" foo3} e
+ assert_match "WRONGTYPE A type error: foo3" $e
+ }
+
r hello 2
}