summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-06-23 10:19:40 +0200
committerantirez <antirez@gmail.com>2015-06-23 10:20:15 +0200
commit0425c60381f9f2d1adf5a08b48f305ecf30dbfa6 (patch)
tree8a002aa64cefa57abdd31f7697ebeb3875a7be77
parentbb3284563c1465556f0d02ab7b4616dcc414b930 (diff)
downloadredis-0425c60381f9f2d1adf5a08b48f305ecf30dbfa6.tar.gz
Geo: test GEOADD with wrong input coordinates
-rw-r--r--tests/unit/geo.tcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/geo.tcl b/tests/unit/geo.tcl
index f42928f91..116659190 100644
--- a/tests/unit/geo.tcl
+++ b/tests/unit/geo.tcl
@@ -7,6 +7,14 @@ start_server {tags {"geo"}} {
r geoadd nyc 40.747533 -73.9454966 "lic market"
} {0}
+ test {GEOADD invalid coordinates} {
+ catch {
+ r geoadd nyc 40.747533 -73.9454966 "lic market" \
+ foo bar "luck market"
+ } err
+ set err
+ } {*valid*}
+
test {GEOADD multi add} {
r geoadd nyc 40.7648057 -73.9733487 "central park n/q/r" 40.7362513 -73.9903085 "union square" 40.7126674 -74.0131604 "wtc one" 40.6428986 -73.7858139 "jfk" 40.7498929 -73.9375699 "q4" 40.7480973 -73.9564142 4545
} {6}