mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e47f91a9ea
commit
bf4bc85d24
3 changed files with 9 additions and 6 deletions
|
@ -13,9 +13,8 @@ class TestBeginEndBlock < Test::Unit::TestCase
|
|||
def test_beginendblock
|
||||
ruby = EnvUtil.rubybin
|
||||
target = File.join(DIR, 'beginmainend.rb')
|
||||
io = IO.popen("#{q(ruby)} #{q(target)}")
|
||||
assert_equal(%w(b1 b2-1 b2 main b3-1 b3 b4 e1 e4 e3 e2 e4-2 e4-1 e1-1 e4-1-1), io.read.split)
|
||||
io.close
|
||||
result = IO.popen("#{q(ruby)} #{q(target)}"){|io|io.read}
|
||||
assert_equal(%w(b1 b2-1 b2 main b3-1 b3 b4 e1 e4 e3 e2 e4-2 e4-1 e1-1 e4-1-1), result.split)
|
||||
end
|
||||
|
||||
def test_begininmethod
|
||||
|
@ -81,6 +80,7 @@ EOW
|
|||
f.read
|
||||
}
|
||||
assert_match /Interrupt$/, out
|
||||
Process.kill(0, 0) rescue return # check if signal works
|
||||
assert_nil $?.exitstatus
|
||||
assert_equal Signal.list["INT"], $?.termsig
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue