From 5b7b60bb5954e73dada16bc6b342020878489bdc Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 18 Jul 2012 14:09:21 +0000 Subject: * 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 --- ChangeLog | 4 ++++ test/ruby/test_beginendblock.rb | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4d1514a844..47537b6d4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jul 18 23:08:57 2012 Tanaka Akira + + * test/ruby/test_beginendblock.rb: remove temporally files early. + Wed Jul 18 22:43:02 2012 Tanaka Akira * 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 -- cgit v1.2.3