use qi - parser to work with 0 speed file lines
This commit is contained in:
		
							parent
							
								
									23b07c9197
								
							
						
					
					
						commit
						1bace1288d
					
				@ -28,3 +28,11 @@ Feature: osrm-contract command line options: datasources
 | 
				
			|||||||
        When I run "osrm-contract --segment-speed-file {speeds_file} {processed_file}"
 | 
					        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"
 | 
					        Then datasource names should contain "lua profile,27_osrmcontract_passing_base_file_speeds"
 | 
				
			||||||
        And it should exit successfully
 | 
					        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
 | 
				
			||||||
 | 
				
			|||||||
@ -268,7 +268,7 @@ template <typename Key, typename Value> struct CSVFilesParser
 | 
				
			|||||||
        qi::rule<Iterator, std::pair<Key, Value>()> csv_line =
 | 
					        qi::rule<Iterator, std::pair<Key, Value>()> csv_line =
 | 
				
			||||||
            (key_rule >> ',' >> value_source) >> -(',' >> *(qi::char_ - qi::eol));
 | 
					            (key_rule >> ',' >> value_source) >> -(',' >> *(qi::char_ - qi::eol));
 | 
				
			||||||
        std::vector<std::pair<Key, Value>> result;
 | 
					        std::vector<std::pair<Key, Value>> 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)
 | 
					        if (!ok || first != last)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user