osrm-prepare -> osrm-contract

This commit is contained in:
Patrick Niklaus
2016-02-14 19:35:37 +01:00
committed by Daniel J. Hofmann
parent 96a5e594b3
commit 085bab749f
12 changed files with 41 additions and 52 deletions
+25
View File
@@ -0,0 +1,25 @@
@prepare @options @files
Feature: osrm-contract command line options: files
# expansions:
# {extracted_base} => path to current extracted 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-contract - Passing base file
When I run "osrm-contract {extracted_base}.osrm"
Then stderr should be empty
And it should exit with code 0
Scenario: osrm-contract - Missing input file
When I run "osrm-contract over-the-rainbow.osrm"
And stderr should contain "over-the-rainbow.osrm"
And stderr should contain "not found"
And it should exit with code 1
+47
View File
@@ -0,0 +1,47 @@
@prepare @options @help
Feature: osrm-contract command line options: help
Scenario: osrm-contract - Help should be shown when no options are passed
When I run "osrm-contract"
Then stderr should be empty
And stdout should contain "osrm-contract <input.osrm> [options]:"
And stdout should contain "Options:"
And stdout should contain "--version"
And stdout should contain "--help"
And stdout should contain "Configuration:"
And stdout should contain "--threads"
And stdout should contain "--core"
And stdout should contain "--level-cache"
And stdout should contain "--segment-speed-file"
And stdout should contain 17 lines
And it should exit with code 1
Scenario: osrm-contract - Help, short
When I run "osrm-contract -h"
Then stderr should be empty
And stdout should contain "osrm-contract <input.osrm> [options]:"
And stdout should contain "Options:"
And stdout should contain "--version"
And stdout should contain "--help"
And stdout should contain "Configuration:"
And stdout should contain "--threads"
And stdout should contain "--core"
And stdout should contain "--level-cache"
And stdout should contain "--segment-speed-file"
And stdout should contain 17 lines
And it should exit with code 0
Scenario: osrm-contract - Help, long
When I run "osrm-contract --help"
Then stderr should be empty
And stdout should contain "osrm-contract <input.osrm> [options]:"
And stdout should contain "Options:"
And stdout should contain "--version"
And stdout should contain "--help"
And stdout should contain "Configuration:"
And stdout should contain "--threads"
And stdout should contain "--core"
And stdout should contain "--level-cache"
And stdout should contain "--segment-speed-file"
And stdout should contain 17 lines
And it should exit with code 0
+12
View File
@@ -0,0 +1,12 @@
@prepare @options @invalid
Feature: osrm-contract command line options: invalid options
Background:
Given the profile "testbot"
Scenario: osrm-contract - Non-existing option
When I run "osrm-contract --fly-me-to-the-moon"
Then stdout should be empty
And stderr should contain "option"
And stderr should contain "fly-me-to-the-moon"
And it should exit with code 1
+22
View File
@@ -0,0 +1,22 @@
@prepare @options @version
Feature: osrm-contract 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-contract - Version, short
When I run "osrm-contract --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-contract - Version, long
When I run "osrm-contract --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