From 9678c37577facb441f3c636c0453eb7a651b2d7d Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 23 Dec 2011 09:34:06 +0100 Subject: [PATCH] Added regression test for ZUNIONSTORE creating NaN (github issue #264) --- tests/unit/type/zset.tcl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/type/zset.tcl b/tests/unit/type/zset.tcl index aa43f3bf..bab98854 100644 --- a/tests/unit/type/zset.tcl +++ b/tests/unit/type/zset.tcl @@ -518,6 +518,12 @@ start_server {tags {"zset"}} { r zinterstore set3 2 set1 set2 } {0} + test {ZUNIONSTORE regression, should not create NaN in scores} { + r zadd z -inf neginf + r zunionstore out 1 z weights 0 + r zrange out 0 -1 withscores + } {neginf 0} + proc stressers {encoding} { if {$encoding == "ziplist"} { # Little extra to allow proper fuzzing in the sorting stresser -- GitLab