Unverified Commit 4a8a6250 authored by Wen Hui's avatar Wen Hui Committed by GitHub
Browse files

add test case for geopos and geohash (#11455)

This PR add test case for PR #11417, with only key as argument for GEOHASH and GEOPOS
parent 5b102e23
...@@ -366,6 +366,13 @@ start_server {tags {"geo"}} { ...@@ -366,6 +366,13 @@ start_server {tags {"geo"}} {
lindex [r geohash points test] 0 lindex [r geohash points test] 0
} {ezs42e44yx0} } {ezs42e44yx0}
test {GEOHASH with only key as argument} {
r del points
r geoadd points 10 20 a 30 40 b
set result [r geohash points]
assert {$result eq {}}
}
test {GEOPOS simple} { test {GEOPOS simple} {
r del points r del points
r geoadd points 10 20 a 30 40 b r geoadd points 10 20 a 30 40 b
...@@ -383,6 +390,13 @@ start_server {tags {"geo"}} { ...@@ -383,6 +390,13 @@ start_server {tags {"geo"}} {
lindex [r geopos points a x b] 1 lindex [r geopos points a x b] 1
} {} } {}
test {GEOPOS with only key as argument} {
r del points
r geoadd points 10 20 a 30 40 b
set result [r geopos points]
assert {$result eq {}}
}
test {GEODIST simple & unit} { test {GEODIST simple & unit} {
r del points r del points
r geoadd points 13.361389 38.115556 "Palermo" \ r geoadd points 13.361389 38.115556 "Palermo" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment