From 0b894d1802957fe005e13a77a2d845c941693fbc Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 24 Sep 2020 17:09:01 -0400 Subject: [PATCH] Add ampersand query test cases These are meant for testing changes like those in https://github.com/pelias/schema/pull/463 regarding `&` characters in queries. They make heavy use of `boundary.gid` for precise queries that examine behavior changes in matching. These aren't neccisarily acceptance tests we want to keep long term. They're just for exploration. --- test_cases/ampersand.json | 113 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 test_cases/ampersand.json diff --git a/test_cases/ampersand.json b/test_cases/ampersand.json new file mode 100644 index 0000000..31af926 --- /dev/null +++ b/test_cases/ampersand.json @@ -0,0 +1,113 @@ +{ + "name": "ampersand", + "priorityThresh": 10, + "normalizers": { + "name": [ + "toLowerCase" + ] + }, + "tests": [ + { + "id": 0, + "in": { + "text": "H&M", + "focus.point.lat": 40.74, + "focus.point.lon": -74, + "boundary.gid": "whosonfirst:locality:85977539" + }, + "expected": { + "properties": [ + { + "name": "H&M", + "layer": "venue", + "locality": "New York", + "region": "New York" + } + ] + } + }, + { + "id": 0.1, + "in": { + "text": "H & M", + "focus.point.lat": 40.74, + "focus.point.lon": -74.0, + "boundary.gid": "whosonfirst:locality:85977539" + }, + "expected": { + "properties": [ + { + "name": "H&M", + "layer": "venue", + "locality": "New York", + "region": "New York" + } + ] + } + }, + { + "id": 1.0, + "in": { + "text": "Press&Books, Heidenheim", + "boundary.gid": "whosonfirst:locality:101761787" + }, + "expected": { + "properties": [ + { + "name": "Press&Books", + "layer": "venue", + "locality": "Heidenheim" + } + ] + } + }, + { + "id": 1.1, + "in": { + "text": "Press & Books, Heidenheim", + "boundary.gid": "whosonfirst:locality:101761787" + }, + "expected": { + "properties": [ + { + "name": "Press&Books", + "layer": "venue", + "locality": "Heidenheim" + } + ] + } + }, + { + "id": 2.0, + "in": { + "text": "Press&Books, Basel", + "boundary.gid": "whosonfirst:locality:101748459" + }, + "expected": { + "properties": [ + { + "name": "Press & Books", + "layer": "venue", + "locality": "Basel" + } + ] + } + }, + { + "id": 1.1, + "in": { + "text": "Press & Books, Basel", + "boundary.gid": "whosonfirst:locality:101748459" + }, + "expected": { + "properties": [ + { + "name": "Press & Books", + "layer": "venue", + "locality": "Basel" + } + ] + } + } + ] +}