Trim datasource names before writing to datafile.

This commit is contained in:
Daniel Patterson
2016-05-23 18:10:50 -04:00
committed by Patrick Niklaus
parent 57dbb18c4c
commit 0587c5f5c4
3 changed files with 41 additions and 1 deletions
+6
View File
@@ -1,4 +1,5 @@
var assert = require('assert');
var fs = require('fs');
module.exports = function () {
this.When(/^I run "osrm\-routed\s?(.*?)"$/, { timeout: this.TIMEOUT }, (options, callback) => {
@@ -59,6 +60,11 @@ module.exports = function () {
assert.equal(this.stdout.split('\n').length - 1, parseInt(lines));
});
this.Then(/^datasource names should contain "(.+)"$/, (expectedData) => {
var actualData = fs.readFileSync(this.osmData.extractedFile+'.osrm.datasource_names',{encoding:'UTF-8'}).trim().split("\n").join(",");
assert.equal(actualData, expectedData);
});
this.Given(/^the query options$/, (table, callback) => {
table.raw().forEach(tuple => {
this.queryParams[tuple[0]] = tuple[1];