Add "clines.cpp" in a better way.

This commit is contained in:
Johan Holmberg 2009-05-12 16:41:02 +00:00 committed by holmberg556
parent d3c5025960
commit 2a7bb70fee
3 changed files with 20 additions and 3 deletions

@ -247,9 +247,15 @@ while /^-/ =~ ARGV[0]
end
end
ENV["PATH"] = (File.expand_path("t/bin") +
Config::CONFIG["PATH_SEPARATOR"] +
ENV["PATH"])
path_dirs = [ File.expand_path("t/bin") ]
if RUBY_PLATFORM =~ /mswin/
path_dirs.unshift File.expand_path("t/bin/windows")
end
ENV["PATH"] = [
path_dirs,
ENV["PATH"]
].join(Config::CONFIG["PATH_SEPARATOR"])
files = ARGV.empty? ? Dir.glob("t/*.rb") : ARGV
rd = RegressionData.new(files)

11
src/clines.cpp Normal file

@ -0,0 +1,11 @@
#include <stdio.h>
int
main(int argc, char* argv[])
{
for (int i=1; i<argc; ++i) {
printf("%s\n", argv[i]);
}
return 0;
}

BIN
t/bin/windows/clines.exe Executable file

Binary file not shown.