[前][次][番号順一覧][スレッド一覧]

ruby-changes:5256

From: akr <ko1@a...>
Date: Mon, 2 Jun 2008 19:18:51 +0900 (JST)
Subject: [ruby-changes:5256] Ruby:r16755 (trunk): * test/ruby/test_argf.rb (teardown): remove renamed temporary files.

akr	2008-06-02 19:18:38 +0900 (Mon, 02 Jun 2008)

  New Revision: 16755

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_argf.rb

  Log:
    * test/ruby/test_argf.rb (teardown): remove renamed temporary files.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16755&r2=16754&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_argf.rb?r1=16755&r2=16754&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16754)
+++ ChangeLog	(revision 16755)
@@ -1,3 +1,7 @@
+Mon Jun  2 19:17:47 2008  Tanaka Akira  <akr@f...>
+
+	* test/ruby/test_argf.rb (teardown): remove renamed temporary files.
+
 Mon Jun  2 18:51:15 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/un.rb (wait_writable): wait until target files can be
Index: test/ruby/test_argf.rb
===================================================================
--- test/ruby/test_argf.rb	(revision 16754)
+++ test/ruby/test_argf.rb	(revision 16755)
@@ -18,14 +18,23 @@
     @t3.puts "5"
     @t3.puts "6"
     @t3.close
+    @tmps = [@t1, @t2, @t3]
   end
 
+  def teardown
+    @tmps.each {|t|
+      bak = t.path + ".bak"
+      File.unlink bak if File.file? bak
+    }
+  end
+
   def make_tempfile
     t = Tempfile.new("foo")
     t.puts "foo"
     t.puts "bar"
     t.puts "baz"
     t.close
+    @tmps << t
     t
   end
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]