1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use

relative path to get rid of "too long commandline" error.

* ChangeLog: fixed wrong description.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2013-03-20 06:24:14 +00:00
parent 119aa9d295
commit 46048d6d1b
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Wed Mar 20 15:22:07 2013 NAKAMURA Usaku <usa@ruby-lang.org>
* test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use
relative path to get rid of "too long commandline" error.
Wed Mar 20 04:27:42 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
* test/rinda/test_rinda.rb: remove unused variables.
@ -94,7 +99,7 @@ Mon Mar 18 14:46:19 2013 NAKAMURA Usaku <usa@ruby-lang.org>
* test/win32ole/test_err_in_callback.rb
(TestErrInCallBack#test_err_in_callback): shouldn't create a file in
source directory.
the top of build directory.
Mon Mar 18 13:29:52 2013 NARUSE, Yui <naruse@ruby-lang.org>

View file

@ -9,6 +9,7 @@ rescue LoadError
end
if defined?(WIN32OLE)
require 'mkmf'
require 'pathname'
require 'test/unit'
require 'tmpdir'
class TestErrInCallBack < Test::Unit::TestCase
@ -17,10 +18,11 @@ if defined?(WIN32OLE)
if File.exist?("./" + CONFIG["RUBY_INSTALL_NAME"] + CONFIG["EXEEXT"])
sep = File::ALT_SEPARATOR || "/"
@ruby = "." + sep + CONFIG["RUBY_INSTALL_NAME"]
cwd = Pathname.new(File.expand_path('.'))
@iopt = $:.map {|e|
" -I " + e
" -I " + Pathname.new(e).relative_path_from(cwd).to_s
}.join("")
@script = File.join(File.dirname(__FILE__), "err_in_callback.rb")
@script = Pathname.new(File.join(File.dirname(__FILE__), "err_in_callback.rb")).relative_path_from(cwd).to_s
end
end
@ -39,7 +41,7 @@ if defined?(WIN32OLE)
Dir.mktmpdir do |tmpdir|
logfile = File.join(tmpdir, "test_err_in_callback.log")
cmd = "#{@ruby} -v #{@iopt} #{@script} > #{logfile.gsub(%r(/), '\\')} 2>&1"
system(cmd)
result = system(cmd)
str = ""
open(logfile) {|ifs|
str = ifs.read