Invalid string values in lanes:psv:backward should result in 0 lanes,
not `nil`.
This commit is contained in:
parent
bb244e28bb
commit
a4f9499305
@ -120,6 +120,24 @@ Feature: Turn Lane Guidance
|
||||
| a,d | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||
| a,c | road,road | depart,arrive | , |
|
||||
|
||||
# This tests whether empty/invalid PSV tags cause osrm-extract to crash
|
||||
@bug
|
||||
Scenario: Turn with Bus-Lane
|
||||
Given the node map
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | lanes:psv:forward | lanes:psv:backward |
|
||||
| ab | road | through\|right\| | 1 | foo |
|
||||
| bc | road | | | |
|
||||
| bd | turn | | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,d | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||
|
||||
@PROFILE @LANES
|
||||
Scenario: Turn with Bus-Lane but without lanes
|
||||
Given the node map
|
||||
|
@ -84,7 +84,7 @@ local function get_psv_counts(way)
|
||||
if( psv_backward and psv_backward ~= "" ) then
|
||||
bw = tonumber(psv_backward);
|
||||
if( bw == nil ) then
|
||||
fw = 0
|
||||
bw = 0
|
||||
end
|
||||
end
|
||||
return fw, bw
|
||||
|
Loading…
Reference in New Issue
Block a user