-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly copy way.nodes() into vector to have correct meta functions
- Loading branch information
Showing
2 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@extract | ||
Feature: osrm-extract lua ways:get_nodes() | ||
|
||
Background: | ||
Given the node map | ||
""" | ||
a b | ||
""" | ||
And the ways | ||
| nodes | | ||
| ab | | ||
And the data has been saved to disk | ||
|
||
Scenario: osrm-extract - Passing base file | ||
Given the profile file "testbot" extended with | ||
""" | ||
function way_function(way, result) | ||
for _, node in ipairs(way:get_nodes()) do | ||
print('node id ' .. node:id()) | ||
end | ||
result.forward_mode = mode.driving | ||
result.forward_speed = 1 | ||
end | ||
""" | ||
When I run "osrm-extract --profile {profile_file} {osm_file}" | ||
Then it should exit successfully | ||
And stdout should contain "node id 1" | ||
And stdout should contain "node id 2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters