cuke: check exit code as last step, add step to non-existing file

This commit is contained in:
Emil Tin 2014-03-22 00:47:20 +01:00
parent de29e17d95
commit 7048dd754d
3 changed files with 17 additions and 15 deletions

View File

@ -6,8 +6,7 @@ Feature: Command line options: help
Scenario: No options should show help
When I run "osrm-routed"
Then it should exit with code 0
And stderr should be empty
Then stderr should be empty
And stdout should contain "osrm-routed <base.osrm> [<options>]:"
And stdout should contain "Options:"
And stdout should contain "--version"
@ -26,11 +25,11 @@ Feature: Command line options: help
And stdout should contain "--port"
And stdout should contain "--threads"
And stdout should contain "--sharedmemory"
And it should exit with code 0
Scenario: Help, short
When I run "osrm-routed -h"
Then it should exit with code 0
And stderr should be empty
Then stderr should be empty
And stdout should contain "osrm-routed <base.osrm> [<options>]:"
And stdout should contain "Options:"
And stdout should contain "--version"
@ -49,11 +48,11 @@ Feature: Command line options: help
And stdout should contain "--port"
And stdout should contain "--threads"
And stdout should contain "--sharedmemory"
And it should exit with code 0
Scenario: Help, long
When I run "osrm-routed --help"
Then it should exit with code 0
And stderr should be empty
Then stderr should be empty
And stdout should contain "osrm-routed <base.osrm> [<options>]:"
And stdout should contain "Options:"
And stdout should contain "--version"
@ -72,3 +71,4 @@ Feature: Command line options: help
And stdout should contain "--port"
And stdout should contain "--threads"
And stdout should contain "--sharedmemory"
And it should exit with code 0

View File

@ -6,13 +6,15 @@ Feature: Command line options: invalid options
Scenario: Non-existing option
When I run "osrm-routed --fly-me-to-the-moon"
Then it should exit with code 255
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 255
Scenario: Missing file
When I run "osrm-routed over-the-rainbow.osrm"
Then it should exit with code 255
Then stdout should contain "over-the-rainbow.osrm"
And stderr should contain "exception"
And stderr should contain "does not exist"
And it should exit with code 255

View File

@ -6,12 +6,12 @@ Feature: Command line options: version
Scenario: Version, short
When I run "osrm-routed -v"
Then it should exit with code 0
And stderr should be empty
Then stderr should be empty
And stdout should contain " v0."
And it should exit with code 0
Scenario: Version, long
When I run "osrm-routed --version"
Then it should exit with code 0
And stderr should be empty
Then stderr should be empty
And stdout should contain " v0."
And it should exit with code 0