From f0069d3dcc9ba5123f610c98ea8b64761bd15dba Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Fri, 29 Apr 2016 13:27:12 +0200 Subject: [PATCH] Makes bicycle and foot profile's name and ref tag handling consistent with car profile --- features/bicycle/names.feature | 10 +++++----- features/bicycle/ref.feature | 2 +- features/foot/names.feature | 10 +++++----- features/foot/ref.feature | 2 +- profiles/bicycle.lua | 2 +- profiles/foot.lua | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/features/bicycle/names.feature b/features/bicycle/names.feature index f67f6b1e1..b19685704 100644 --- a/features/bicycle/names.feature +++ b/features/bicycle/names.feature @@ -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 diff --git a/features/bicycle/ref.feature b/features/bicycle/ref.feature index 195089e0e..a9c908442 100644 --- a/features/bicycle/ref.feature +++ b/features/bicycle/ref.feature @@ -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 diff --git a/features/foot/names.feature b/features/foot/names.feature index a765de682..6a28aaf31 100644 --- a/features/foot/names.feature +++ b/features/foot/names.feature @@ -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 diff --git a/features/foot/ref.feature b/features/foot/ref.feature index 8fed58692..39bc3e8dc 100644 --- a/features/foot/ref.feature +++ b/features/foot/ref.feature @@ -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 diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 644a254d1..79d7b1359 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -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 diff --git a/profiles/foot.lua b/profiles/foot.lua index 04f16c2a2..002f06d78 100644 --- a/profiles/foot.lua +++ b/profiles/foot.lua @@ -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