From 2afe5e971bd23835fb21d956d2d023475fb3beb1 Mon Sep 17 00:00:00 2001 From: karenzshea Date: Mon, 13 Feb 2017 14:52:50 +0100 Subject: [PATCH] use qi - parser to work with 0 speed file lines --- features/options/contract/datasources.feature | 8 ++++++++ src/contractor/contractor.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/features/options/contract/datasources.feature b/features/options/contract/datasources.feature index 363058b80..6da539c31 100644 --- a/features/options/contract/datasources.feature +++ b/features/options/contract/datasources.feature @@ -28,3 +28,11 @@ Feature: osrm-contract command line options: datasources When I run "osrm-contract --segment-speed-file {speeds_file} {processed_file}" Then datasource names should contain "lua profile,27_osrmcontract_passing_base_file_speeds" And it should exit successfully + + Scenario: osrm-contract - Passing base file + Given the speed file + """ + """ + And the data has been extracted + When I run "osrm-contract --segment-speed-file {speeds_file} {processed_file}" + Then it should exit successfully diff --git a/src/contractor/contractor.cpp b/src/contractor/contractor.cpp index 2e8ed62c9..bf9741bb7 100644 --- a/src/contractor/contractor.cpp +++ b/src/contractor/contractor.cpp @@ -268,7 +268,7 @@ template struct CSVFilesParser qi::rule()> csv_line = (key_rule >> ',' >> value_source) >> -(',' >> *(qi::char_ - qi::eol)); std::vector> result; - const auto ok = qi::parse(first, last, (csv_line % qi::eol) >> *qi::eol, result); + const auto ok = qi::parse(first, last, -(csv_line % qi::eol) >> *qi::eol, result); if (!ok || first != last) {