diff options
author | Wen Hui <wen.hui.ware@gmail.com> | 2022-11-01 01:54:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 07:54:03 +0200 |
commit | 4a8a62505134094f8de0ca293da932c3d009df15 (patch) | |
tree | 2e755ee2c3af3ebd4f5982a5cf035d925ac912f3 /tests | |
parent | 5b102e2339f45f1a688215496a884893accec527 (diff) | |
download | redis-4a8a62505134094f8de0ca293da932c3d009df15.tar.gz |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/geo.tcl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/geo.tcl b/tests/unit/geo.tcl index 1c7564430..58535bef6 100644 --- a/tests/unit/geo.tcl +++ b/tests/unit/geo.tcl @@ -366,6 +366,13 @@ start_server {tags {"geo"}} { lindex [r geohash points test] 0 } {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} { r del points r geoadd points 10 20 a 30 40 b @@ -383,6 +390,13 @@ start_server {tags {"geo"}} { 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} { r del points r geoadd points 13.361389 38.115556 "Palermo" \ |