]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/query/housenumbers.feature
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / test / bdd / db / query / housenumbers.feature
1 @DB
2 Feature: Searching of house numbers
3     Test for specialised treeatment of housenumbers
4
5     Background:
6         Given the grid
7          | 1 |   | 2 |   | 3 |
8          |   | 9 |   |   |   |
9          |   |   |   |   | 4 |
10
11
12     Scenario: A simple numeral housenumber is found
13         Given the places
14          | osm | class    | type | housenr | geometry |
15          | N1  | building | yes  | 45      | 9        |
16         And the places
17          | osm | class   | type | name       | geometry |
18          | W10 | highway | path | North Road | 1,2,3    |
19         When importing
20         And sending search query "45, North Road"
21         Then results contain
22          | osm |
23          | N1  |
24         When sending search query "North Road 45"
25         Then results contain
26          | osm |
27          | N1  |
28
29
30     Scenario Outline: Each housenumber in a list is found
31         Given the places
32          | osm | class    | type | housenr | geometry |
33          | N1  | building | yes  | <hnrs>  | 9        |
34         And the places
35          | osm | class   | type | name     | geometry |
36          | W10 | highway | path | Multistr | 1,2,3    |
37         When importing
38         When sending search query "2 Multistr"
39         Then results contain
40          | osm |
41          | N1  |
42         When sending search query "4 Multistr"
43         Then results contain
44          | osm |
45          | N1  |
46         When sending search query "12 Multistr"
47         Then results contain
48          | osm |
49          | N1  |
50
51      Examples:
52         | hnrs |
53         | 2;4;12 |
54         | 2,4,12 |
55         | 2, 4, 12 |