mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: added test for
eval-ed BEGIN END order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
56235e083d
commit
3d307549a5
3 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Oct 6 11:57:06 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: added
|
||||
test for eval-ed BEGIN END order.
|
||||
|
||||
Mon Oct 6 09:19:54 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* marshal.c (w_object): should pass "weak" value to next level.
|
||||
|
|
|
@ -27,6 +27,24 @@ END {
|
|||
puts "should not be dumped"
|
||||
}
|
||||
|
||||
eval <<EOE
|
||||
BEGIN {
|
||||
puts "innerbegin1"
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
puts "innerbegin2"
|
||||
}
|
||||
|
||||
END {
|
||||
puts "innerend2"
|
||||
}
|
||||
|
||||
END {
|
||||
puts "innerend1"
|
||||
}
|
||||
EOE
|
||||
|
||||
END {
|
||||
exit
|
||||
puts "should not be dumped"
|
||||
|
|
|
@ -7,7 +7,7 @@ class TestBeginEndBlock < Test::Unit::TestCase
|
|||
def test_beginendblock
|
||||
ruby = EnvUtil.rubybin
|
||||
io = IO.popen("\"#{ruby}\" \"#{DIR}/beginmainend.rb\"")
|
||||
assert_equal(%w(begin1 begin2 main end1 end2).join("\n") << "\n", io.read)
|
||||
assert_equal(%w(begin1 begin2 main innerbegin1 innerbegin2 end1 innerend1 innerend2 end2).join("\n") << "\n", io.read)
|
||||
end
|
||||
|
||||
def test_begininmethod
|
||||
|
|
Loading…
Reference in a new issue