Makes bicycle and foot profile's name and ref tag handling consistent with car profile

This commit is contained in:
Daniel J. Hofmann 2016-04-29 13:27:12 +02:00 committed by Patrick Niklaus
parent 206bdff9e7
commit f0069d3dcc
No known key found for this signature in database
GPG Key ID: E426891B5F978B1B
6 changed files with 14 additions and 14 deletions

View File

@ -10,13 +10,13 @@ Feature: Bike - Street names in instructions
| | c |
And the ways
| nodes | name |
| ab | My Way |
| bc | Your Way |
| nodes | name | ref |
| ab | My Way | A6 |
| bc | Your Way | A7 |
When I route I should get
| from | to | route |
| a | c | My Way,Your Way,Your Way |
| from | to | route |
| a | c | My Way (A6),Your Way (A7),Your Way (A7) |
@unnamed
Scenario: Bike - Use way type to describe unnamed ways

View File

@ -14,7 +14,7 @@ Feature: Bike - Way ref
When I route I should get
| from | to | route |
| a | b | Utopia Drive / E7,Utopia Drive / E7 |
| a | b | Utopia Drive (E7),Utopia Drive (E7) |
Scenario: Bike - Way with only ref
Given the node map

View File

@ -10,13 +10,13 @@ Feature: Foot - Street names in instructions
| | c |
And the ways
| nodes | name |
| ab | My Way |
| bc | Your Way |
| nodes | name | ref |
| ab | My Way | A6 |
| bc | Your Way | B7 |
When I route I should get
| from | to | route |
| a | c | My Way,Your Way,Your Way |
| from | to | route |
| a | c | My Way (A6),Your Way (B7),Your Way (B7) |
@unnamed
Scenario: Foot - Use way type to describe unnamed ways

View File

@ -14,7 +14,7 @@ Feature: Foot - Way ref
When I route I should get
| from | to | route |
| a | b | Utopia Drive / E7,Utopia Drive / E7 |
| a | b | Utopia Drive (E7),Utopia Drive (E7) |
Scenario: Foot - Way with only ref
Given the node map

View File

@ -210,7 +210,7 @@ function way_function (way, result)
-- name
if ref and "" ~= ref and name and "" ~= name then
result.name = name .. ' / ' .. ref
result.name = name .. " (" .. ref .. ")"
elseif ref and "" ~= ref then
result.name = ref
elseif name and "" ~= name then

View File

@ -151,7 +151,7 @@ function way_function (way, result)
-- name
if ref and "" ~= ref and name and "" ~= name then
result.name = name .. ' / ' .. ref
result.name = name .. " (" .. ref .. ")"
elseif ref and "" ~= ref then
result.name = ref
elseif name and "" ~= name then