mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_beginendblock.rb (test_should_propagate_signaled):
get rid of invoking shell. [ruby-dev:30942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
18342ff8e0
commit
ab4a126782
4 changed files with 12 additions and 6 deletions
|
@ -68,15 +68,14 @@ EOW
|
|||
|
||||
def test_should_propagate_exit_code
|
||||
ruby = EnvUtil.rubybin
|
||||
assert_equal false, system("#{q(ruby)} -e 'at_exit{exit 2}'")
|
||||
assert_equal false, system(ruby, '-e', 'at_exit{exit 2}')
|
||||
assert_equal 2, $?.exitstatus
|
||||
assert_nil $?.termsig
|
||||
end
|
||||
|
||||
def test_should_propagate_signaled
|
||||
ruby = EnvUtil.rubybin
|
||||
out = IO.popen("#{q(ruby)} -e 'STDERR.reopen(STDOUT);" \
|
||||
"at_exit{Process.kill(:INT, $$)}'"){|f|
|
||||
out = IO.popen("#{ruby} #{File.dirname(__FILE__)}/suicide.rb"){|f|
|
||||
f.read
|
||||
}
|
||||
assert_match /Interrupt$/, out
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue