Merge pull request #6546 from guybe7/fix_neg_zero

Make sure Redis does not reply with negative zero
This commit is contained in:
Salvatore Sanfilippo
2020-04-02 16:26:57 +02:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@ -151,4 +151,10 @@ start_server {tags {"incr"}} {
catch {r incrbyfloat foo 1} err
format $err
} {ERR*valid*}
test {No negative zero} {
r incrbyfloat foo [expr double(1)/41]
r incrbyfloat foo [expr double(-1)/41]
r get foo
} {0}
}