From 759222eef2d7c3911a380a64834dc6fd37d58178 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 9 Jan 2015 23:17:17 +0100 Subject: [PATCH] tests for name import in osm2pgsql --- tests/features/osm2pgsql/import/tags.feature | 79 ++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 tests/features/osm2pgsql/import/tags.feature diff --git a/tests/features/osm2pgsql/import/tags.feature b/tests/features/osm2pgsql/import/tags.feature new file mode 100644 index 00000000..37940756 --- /dev/null +++ b/tests/features/osm2pgsql/import/tags.feature @@ -0,0 +1,79 @@ +@DB +Feature: Tag evaluation + Tests if tags are correctly imported into the place table + + Scenario Outline: Name tags + Given the osm nodes: + | id | tags + | 1 | 'highway' : 'yes', '' : 'Foo' + When loading osm data + Then table place contains + | object | name + | N1 | '' : 'Foo' + + Examples: + | nametag + | ref + | int_ref + | nat_ref + | reg_ref + | loc_ref + | old_ref + | iata + | icao + | pcode:1 + | pcode:2 + | pcode:3 + | name + | name:de + | name:bt-BR + | int_name + | int_name:xxx + | nat_name + | nat_name:fr + | reg_name + | reg_name:1 + | loc_name + | loc_name:DE + | old_name + | old_name:v1 + | alt_name + | alt_name:dfe + | alt_name_1 + | official_name + | common_name + | common_name:pot + | short_name + | short_name:CH + | operator + + Scenario Outline: Ignored name tags + Given the osm nodes: + | id | tags + | 1 | 'highway' : 'yes', '' : 'Foo', 'name' : 'real' + When loading osm data + Then table place contains + | object | name + | N1 | 'name' : 'real' + + Examples: + | nametag + | name_de + | Name + | ref:de + | ref_de + | my:ref + : br:name + + Scenario: Special character in name tag + Given the osm nodes: + | id | tags + | 1 | 'highway' : 'yes', 'name: de' : 'Foo', 'name' : 'real' + | 2 | 'highway' : 'yes', 'name:\nde' : 'Foo', 'name' : 'real' + | 3 | 'highway' : 'yes', 'name:\tde' : 'Foo', 'name:\\' : 'real' + When loading osm data + Then table place contains + | object | name + | N1 | 'name:_de' : 'Foo', 'name' : 'real' + | N2 | 'name:_de' : 'Foo', 'name' : 'real' + | N3 | 'name:_de' : 'Foo', 'name:\\\\' : 'real' -- 2.39.5