fixes issue #1019:
- fix ignored turn restriction on chains of degree-2 nodes - add a cucumber test to test for potential regressions
This commit is contained in:
@@ -30,6 +30,35 @@ Feature: Car - Turn restrictions
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No straight on
|
||||
Given the node map
|
||||
| a | b | j | d | e |
|
||||
| v | | | | z |
|
||||
| | w | x | y | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| ab | no |
|
||||
| bj | no |
|
||||
| jd | no |
|
||||
| de | no |
|
||||
| ej | no |
|
||||
| av | yes |
|
||||
| vw | yes |
|
||||
| wx | yes |
|
||||
| xy | yes |
|
||||
| yz | yes |
|
||||
| ze | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bj | jd | j | no_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | e | av,vw,wx,xy,yz,ze |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No right turn
|
||||
Given the node map
|
||||
@@ -248,4 +277,4 @@ Feature: Car - Turn restrictions
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| s | b | sj,bj |
|
||||
|
||||
Reference in New Issue
Block a user