diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-18 14:09:21 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-18 14:09:21 +0000 |
commit | 5b7b60bb5954e73dada16bc6b342020878489bdc (patch) | |
tree | 9e8b5d208f87fde6d7f3a9c64abcce1a9a3c380e | |
parent | bc893dcf0753e5477170de2df476ed665f3e0b95 (diff) |
* test/ruby/test_beginendblock.rb: remove temporally files early.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | test/ruby/test_beginendblock.rb | 8 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Wed Jul 18 23:08:57 2012 Tanaka Akira <akr@fsij.org> + + * test/ruby/test_beginendblock.rb: remove temporally files early. + Wed Jul 18 22:43:02 2012 Tanaka Akira <akr@fsij.org> * test/ruby/test_autoload.rb: remove temporally files early. diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb index 7172aec4e1..beb934b1ac 100644 --- a/test/ruby/test_beginendblock.rb +++ b/test/ruby/test_beginendblock.rb @@ -30,6 +30,8 @@ class TestBeginEndBlock < Test::Unit::TestCase assert_equal(%w(:begin :end), result.split) result = IO.popen([ruby, "-p", "-eBEGIN{p :begin}", "-eEND{p :end}", inputpath]){|io|io.read} assert_equal(%w(:begin foo bar :end), result.split) + ensure + input.unlink end def test_begininmethod @@ -76,6 +78,9 @@ endblockwarn_rb:2: warning: END in method; use at_exit EOW assert_equal(expected, File.read(erroutpath)) # expecting Tempfile to unlink launcher and errout file. + ensure + launcher.unlink + errout.unlink end def test_raise_in_at_exit @@ -146,7 +151,8 @@ EOW "outer0" ] assert_in_out_err(t.path, "", expected, [], "[ruby-core:35237]") - t.close + ensure + t.close(true) end def test_rescue_at_exit |