mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
merge revision(s) 39809,39834,39837: [Backport #8132]
* test/win32ole/test_err_in_callback.rb (TestErrInCallBack#test_err_in_callback): shouldn't create a file in source directory. * test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use relative path to get rid of "too long commandline" error. the top of build directory. * test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): allow using different root for source and build directories. this may fixes a minor problem of r39834. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7631f28cc9
commit
2aaa9ab940
3 changed files with 34 additions and 14 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
||||||
|
Wed Mar 20 23:17:33 2013 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup):
|
||||||
|
allow using different root for source and build directories.
|
||||||
|
this may fixes a minor problem of r39834.
|
||||||
|
|
||||||
|
Wed Mar 20 23:17:33 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 23:17:33 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
|
||||||
|
the top of build directory.
|
||||||
|
|
||||||
Wed Mar 20 23:08:40 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
Wed Mar 20 23:08:40 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* include/ruby/missing.h: removed __linux__. it's unnecessary.
|
* include/ruby/missing.h: removed __linux__. it's unnecessary.
|
||||||
|
|
|
@ -9,17 +9,21 @@ rescue LoadError
|
||||||
end
|
end
|
||||||
if defined?(WIN32OLE)
|
if defined?(WIN32OLE)
|
||||||
require 'mkmf'
|
require 'mkmf'
|
||||||
|
require 'pathname'
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
|
require 'tmpdir'
|
||||||
class TestErrInCallBack < Test::Unit::TestCase
|
class TestErrInCallBack < Test::Unit::TestCase
|
||||||
def setup
|
def setup
|
||||||
@ruby = nil
|
@ruby = nil
|
||||||
if File.exist?("./" + CONFIG["RUBY_INSTALL_NAME"] + CONFIG["EXEEXT"])
|
if File.exist?("./" + CONFIG["RUBY_INSTALL_NAME"] + CONFIG["EXEEXT"])
|
||||||
sep = File::ALT_SEPARATOR || "/"
|
sep = File::ALT_SEPARATOR || "/"
|
||||||
@ruby = "." + sep + CONFIG["RUBY_INSTALL_NAME"]
|
@ruby = "." + sep + CONFIG["RUBY_INSTALL_NAME"]
|
||||||
|
cwd = Pathname.new(File.expand_path('.'))
|
||||||
@iopt = $:.map {|e|
|
@iopt = $:.map {|e|
|
||||||
" -I " + e
|
" -I " + (Pathname.new(e).relative_path_from(cwd).to_s rescue e)
|
||||||
}.join("")
|
}.join("")
|
||||||
@script = File.join(File.dirname(__FILE__), "err_in_callback.rb")
|
script = File.join(File.dirname(__FILE__), "err_in_callback.rb")
|
||||||
|
@script = Pathname.new(script).relative_path_from(cwd).to_s rescue script
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -35,18 +39,17 @@ if defined?(WIN32OLE)
|
||||||
def test_err_in_callback
|
def test_err_in_callback
|
||||||
skip "'ADODB.Connection' is not available" unless available_adodb?
|
skip "'ADODB.Connection' is not available" unless available_adodb?
|
||||||
if @ruby
|
if @ruby
|
||||||
cmd = "#{@ruby} -v #{@iopt} #{@script} > test_err_in_callback.log 2>&1"
|
Dir.mktmpdir do |tmpdir|
|
||||||
system(cmd)
|
logfile = File.join(tmpdir, "test_err_in_callback.log")
|
||||||
str = ""
|
cmd = "#{@ruby} -v #{@iopt} #{@script} > #{logfile.gsub(%r(/), '\\')} 2>&1"
|
||||||
open("test_err_in_callback.log") {|ifs|
|
result = system(cmd)
|
||||||
str = ifs.read
|
str = ""
|
||||||
}
|
open(logfile) {|ifs|
|
||||||
assert_match(/NameError/, str)
|
str = ifs.read
|
||||||
|
}
|
||||||
|
assert_match(/NameError/, str)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
|
||||||
File.unlink("test_err_in_callback.log") if File.exist?("test_err_in_callback.log")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#define RUBY_VERSION "2.0.0"
|
#define RUBY_VERSION "2.0.0"
|
||||||
#define RUBY_RELEASE_DATE "2013-03-20"
|
#define RUBY_RELEASE_DATE "2013-03-20"
|
||||||
#define RUBY_PATCHLEVEL 84
|
#define RUBY_PATCHLEVEL 85
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2013
|
#define RUBY_RELEASE_YEAR 2013
|
||||||
#define RUBY_RELEASE_MONTH 3
|
#define RUBY_RELEASE_MONTH 3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue