ruby-changes:27782
From: usa <ko1@a...>
Date: Wed, 20 Mar 2013 15:24:26 +0900 (JST)
Subject: [ruby-changes:27782] usa:r39834 (trunk): * test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use
usa 2013-03-20 15:24:14 +0900 (Wed, 20 Mar 2013) New Revision: 39834 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39834 Log: * test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use relative path to get rid of "too long commandline" error. * ChangeLog: fixed wrong description. Modified files: trunk/ChangeLog trunk/test/win32ole/test_err_in_callback.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 39833) +++ ChangeLog (revision 39834) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Mar 20 15:22:07 2013 NAKAMURA Usaku <usa@r...> + + * 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@g...> * test/rinda/test_rinda.rb: remove unused variables. @@ -94,7 +99,7 @@ Mon Mar 18 14:46:19 2013 NAKAMURA Usaku https://github.com/ruby/ruby/blob/trunk/ChangeLog#L99 * 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@r...> Index: test/win32ole/test_err_in_callback.rb =================================================================== --- test/win32ole/test_err_in_callback.rb (revision 39833) +++ test/win32ole/test_err_in_callback.rb (revision 39834) @@ -9,6 +9,7 @@ rescue LoadError https://github.com/ruby/ruby/blob/trunk/test/win32ole/test_err_in_callback.rb#L9 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) https://github.com/ruby/ruby/blob/trunk/test/win32ole/test_err_in_callback.rb#L18 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) https://github.com/ruby/ruby/blob/trunk/test/win32ole/test_err_in_callback.rb#L41 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/