fix tests that use {base} expansion

This commit is contained in:
Emil Tin
2014-10-17 14:48:52 +02:00
parent 48333f73d5
commit cc3646ca16
4 changed files with 22 additions and 13 deletions
+13 -4
View File
@@ -1,12 +1,21 @@
def run_bin bin, options
Dir.chdir TEST_FOLDER do
opt = options.dup
if opt.include? '{base}'
raise "*** {base} is missing" unless prepared_file
opt.gsub! "{base}", "#{prepared_file}"
if opt.include? '{osm_base}'
raise "*** {osm_base} is missing" unless osm_file
opt.gsub! "{osm_base}", "#{osm_file}"
end
if opt.include? '{extracted_base}'
raise "*** {extracted_base} is missing" unless extracted_file
opt.gsub! "{extracted_base}", "#{extracted_file}"
end
if opt.include? '{prepared_base}'
raise "*** {prepared_base} is missing" unless prepared_file
opt.gsub! "{prepared_base}", "#{prepared_file}"
end
if opt.include? '{profile}'
opt.gsub! "{profile}", "#{PROFILES_PATH}/#{@profile}.lua"
end