summaryrefslogtreecommitdiff
path: root/tests/unit/pubsub.tcl
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2014-08-01 13:57:30 -0400
committerantirez <antirez@gmail.com>2014-08-08 11:19:37 +0200
commit25791550e085930c196b9234465f6538fe8ee383 (patch)
tree12e9a24256f32a9ab223755fb659c749fdc3cd87 /tests/unit/pubsub.tcl
parent4bb6844e4354738b1fc7400be016277e22fa585b (diff)
downloadredis-25791550e085930c196b9234465f6538fe8ee383.tar.gz
pubsub: Return integers for NUMSUB, not strings
Also adds test for numsub — due to tcl being tcl, it doesn't capture the "numberness" of the fix, but now we at least have one test case for numsub. Closes #1561
Diffstat (limited to 'tests/unit/pubsub.tcl')
-rw-r--r--tests/unit/pubsub.tcl4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/pubsub.tcl b/tests/unit/pubsub.tcl
index 18033bdf2..9c7a43bf0 100644
--- a/tests/unit/pubsub.tcl
+++ b/tests/unit/pubsub.tcl
@@ -196,6 +196,10 @@ start_server {tags {"pubsub"}} {
$rd1 close
}
+ test "NUMSUB returns numbers, not strings (#1561)" {
+ r pubsub numsub abc def
+ } {abc 0 def 0}
+
test "Mix SUBSCRIBE and PSUBSCRIBE" {
set rd1 [redis_deferring_client]
assert_equal {1} [subscribe $rd1 {foo.bar}]