diff --git a/features/options/options.feature b/features/options/options.feature index ef04f3f7c..f87e0ccd1 100644 --- a/features/options/options.feature +++ b/features/options/options.feature @@ -33,17 +33,14 @@ Feature: Command line options And stdout should contain "--port" And stdout should contain "--threads" And stdout should contain "--sharedmemory" - - @todo + 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 "unrecognised option '--fly-me-to-the-moon'" - - @todo + Scenario: Missing file When I run "osrm-routed overtherainbow.osrm" Then it should exit with code 255 - Then stdout should be empty - And stderr should contain "missing" \ No newline at end of file + And stderr should contain "does not exist" diff --git a/routed.cpp b/routed.cpp index e9ccb9479..f192af449 100644 --- a/routed.cpp +++ b/routed.cpp @@ -185,6 +185,7 @@ int main (int argc, const char * argv[]) catch (std::exception& e) { std::cerr << "[fatal error] exception: " << e.what() << std::endl; + return -1; } #ifdef __linux__ munlockall();