]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #1733 from krahulreddy/whitespaces-considered-as-single-space
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 3 Apr 2020 16:01:47 +0000 (18:01 +0200)
committerGitHub <noreply@github.com>
Fri, 3 Apr 2020 16:01:47 +0000 (18:01 +0200)
Support whitespace characters(x09-x0d) as single space

1  2 
test/bdd/api/search/queries.feature

index e0f5846685cadb0d20d5d8c154b5e2dad9dc8a0d,7ac9813a519ba81a1e8d325c74f869f1d8b0e779..57ae2c2038383349e8b7404e0017ca1cedd1455a
@@@ -26,6 -26,7 +26,6 @@@ Feature: Search querie
            | neighbourhood | Auenviertel |
            | suburb        | Eilbek |
            | postcode      | 22089 |
 -          | city_district | Wandsbek |
            | city          | Hamburg |
            | country       | Deutschland |
            | country_code  | de |
@@@ -41,6 -42,7 +41,6 @@@
            | neighbourhood | Auenviertel |
            | suburb        | Eilbek |
            | postcode      | 22089 |
 -          | city_district | Wandsbek |
            | city          | Hamburg |
            | country       | Deutschland |
            | country_code  | de |
            | 0  | 6395 |
            | 1  | 6395 BIS |
  
+     Scenario Outline: Same Searches with white spaces 
+         When sending json search query "<data>"
+         Then exactly 1 result is returned
+         And results contain
+           | class   |
+           | building |
+     Examples:
+       | data |
+       | amerlugalpe, N 47.15739° E 9.61264° |
+       | amerlugalpe,  N 47.15739° E 9.61264° |
+       |       amerlugalpe     ,       N 47.15739° E 9.61264° |
+       | amerlugalpe, N 47.15739°             E 9.61264° |
+       | amerlugalpe\v, N 47.15739° E  9.61264° |
+     Scenario: Searched with white spaces
+         When sending json search query "22nd  Street Southwest\v,\fHuron"
+         Then results contain
+           | class   | type |
+           | highway | residential |