fix specs create_exe() on Windows

This commit is contained in:
Josh Holtrop 2019-08-26 18:51:03 -04:00
parent 2dd1ce9f1d
commit eb54a2b64a

View File

@ -65,6 +65,9 @@ describe Rscons do
def create_exe(exe_name, contents) def create_exe(exe_name, contents)
exe_file = "#{@build_test_run_dir}/_bin/#{exe_name}" exe_file = "#{@build_test_run_dir}/_bin/#{exe_name}"
if RUBY_PLATFORM =~ /mingw/
exe_file += ".bat"
end
File.open(exe_file, "wb") do |fh| File.open(exe_file, "wb") do |fh|
fh.puts("#!/bin/sh") fh.puts("#!/bin/sh")
fh.puts(contents) fh.puts(contents)