Wrap way.nodes() returned reference into sol::as_table
This commit is contained in:
committed by
Moritz Kobitzsch
parent
e6ff17ab2a
commit
2640a319c1
@@ -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"
|
||||
Reference in New Issue
Block a user