diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-12-31 15:02:22 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-12-31 15:02:22 +0000 |
| commit | 4ef881bd15c9c4e2e9b20da2c091e80d4d530119 (patch) | |
| tree | 7b725552a9a4ded93849ca2faab1b257f7761790 /test/ruby/test_beginendblock.rb | |
| parent | 182520b0acc5eea4da52bc8734dc5e3280ce5f94 (diff) | |
| download | ruby-4ef881bd15c9c4e2e9b20da2c091e80d4d530119.tar.gz ruby-4ef881bd15c9c4e2e9b20da2c091e80d4d530119.tar.xz ruby-4ef881bd15c9c4e2e9b20da2c091e80d4d530119.zip | |
* Merge YARV
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_beginendblock.rb')
| -rw-r--r-- | test/ruby/test_beginendblock.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb index a8e5913b1..82b888089 100644 --- a/test/ruby/test_beginendblock.rb +++ b/test/ruby/test_beginendblock.rb @@ -12,9 +12,9 @@ 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 + IO.popen("#{q(ruby)} #{q(target)}"){|io| + 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) + } end def test_begininmethod @@ -46,11 +46,16 @@ EOF errout.close erroutpath = errout.path system("#{q(ruby)} #{q(launcherpath)} #{q(erroutpath)}") +# expected = <<EOW +#endblockwarn.rb:2: warning: END in method; use at_exit +#(eval):2: warning: END in method; use at_exit +#EOW expected = <<EOW -endblockwarn.rb:2: warning: END in method; use at_exit -(eval):2: warning: END in method; use at_exit +warning: END in method; use at_exit +warning: END in method; use at_exit EOW assert_equal(expected, File.read(erroutpath)) # expecting Tempfile to unlink launcher and errout file. end + end |
