cuke: test options for osrm-extract and osrm-prepare
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
@prepare @options @files
|
||||
Feature: osrm-prepare command line options: files
|
||||
# expansions:
|
||||
# {base} => path to current input file
|
||||
# {profile} => path to current profile script
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
And the node map
|
||||
| a | b |
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
And the data has been extracted
|
||||
|
||||
Scenario: osrm-prepare - Passing base file
|
||||
When I run "osrm-extract {base}.osm --profile {profile}"
|
||||
Then stderr should be empty
|
||||
And it should exit with code 0
|
||||
When I run "osrm-prepare {base}.osrm --profile {profile}"
|
||||
Then stderr should be empty
|
||||
And it should exit with code 0
|
||||
|
||||
@todo
|
||||
Scenario: osrm-prepare - Order of options should not matter
|
||||
When I run "osrm-prepare --profile {profile} {base}.osm"
|
||||
Then stderr should be empty
|
||||
And it should exit with code 0
|
||||
|
||||
@todo
|
||||
Scenario: osrm-prepare - Missing input file
|
||||
When I run "osrm-prepare over-the-rainbow.osrm --profile {profile}"
|
||||
And stderr should contain "over-the-rainbow.osrm"
|
||||
And stderr should contain "not found"
|
||||
And it should exit with code 1
|
||||
@@ -0,0 +1,51 @@
|
||||
@prepare @options @help
|
||||
Feature: osrm-prepare command line options: help
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
@todo
|
||||
Scenario: osrm-prepare - Help should be shown when no options are passed
|
||||
When I run "osrm-prepare"
|
||||
Then stderr should be empty
|
||||
And stdout should contain "osrm-prepare <input.osrm> [options]:"
|
||||
And stdout should contain "Options:"
|
||||
And stdout should contain "--version"
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "--config"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--restrictions"
|
||||
And stdout should contain "--profile"
|
||||
And stdout should contain "--threads"
|
||||
And stdout should contain 15 lines
|
||||
And it should exit with code 0
|
||||
|
||||
Scenario: osrm-prepare - Help, short
|
||||
When I run "osrm-prepare -h"
|
||||
Then stderr should be empty
|
||||
And stdout should contain "osrm-prepare <input.osrm> [options]:"
|
||||
And stdout should contain "Options:"
|
||||
And stdout should contain "--version"
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "--config"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--restrictions"
|
||||
And stdout should contain "--profile"
|
||||
And stdout should contain "--threads"
|
||||
And stdout should contain 15 lines
|
||||
And it should exit with code 0
|
||||
|
||||
Scenario: osrm-prepare - Help, long
|
||||
When I run "osrm-prepare --help"
|
||||
Then stderr should be empty
|
||||
And stdout should contain "osrm-prepare <input.osrm> [options]:"
|
||||
And stdout should contain "Options:"
|
||||
And stdout should contain "--version"
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "--config"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--restrictions"
|
||||
And stdout should contain "--profile"
|
||||
And stdout should contain "--threads"
|
||||
And stdout should contain 15 lines
|
||||
And it should exit with code 0
|
||||
@@ -0,0 +1,13 @@
|
||||
@prepare @options @invalid
|
||||
Feature: osrm-prepare command line options: invalid options
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
@todo
|
||||
Scenario: osrm-prepare - Non-existing option
|
||||
When I run "osrm-prepare --fly-me-to-the-moon"
|
||||
Then stdout should be empty
|
||||
And stderr should contain "exception"
|
||||
And stderr should contain "fly-me-to-the-moon"
|
||||
And it should exit with code 1
|
||||
@@ -0,0 +1,22 @@
|
||||
@prepare @options @version
|
||||
Feature: osrm-prepare command line options: version
|
||||
# the regex will match these two formats:
|
||||
# v0.3.7.0 # this is the normal format when you build from a git clone
|
||||
# -128-NOTFOUND # if you build from a shallow clone (used on Travis)
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
Scenario: osrm-prepare - Version, short
|
||||
When I run "osrm-prepare --v"
|
||||
Then stderr should be empty
|
||||
And stdout should contain 1 line
|
||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||
And it should exit with code 0
|
||||
|
||||
Scenario: osrm-prepare - Version, long
|
||||
When I run "osrm-prepare --version"
|
||||
Then stderr should be empty
|
||||
And stdout should contain 1 line
|
||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||
And it should exit with code 0
|
||||
Reference in New Issue
Block a user