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:
Dennis Luxen
2014-05-19 12:53:27 +02:00
parent 75a2d4d00a
commit d028a30f87
4 changed files with 87 additions and 6 deletions
+30 -1
View File
@@ -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 |