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

ruby-changes:13642

From: nobu <ko1@a...>
Date: Wed, 21 Oct 2009 12:45:07 +0900 (JST)
Subject: [ruby-changes:13642] Ruby:r25426 (trunk): * test/scanf/test_scanfio.rb (TestScanfIO): needs to inherit

nobu	2009-10-21 12:44:56 +0900 (Wed, 21 Oct 2009)

  New Revision: 25426

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25426

  Log:
    * test/scanf/test_scanfio.rb (TestScanfIO): needs to inherit
      TestCase.
    
    * test/scanf/test_scanfio.rb (TestScanfIO#test_io): fixed a typo.
      close test data file.

  Modified files:
    trunk/test/scanf/test_scanfio.rb

Index: test/scanf/test_scanfio.rb
===================================================================
--- test/scanf/test_scanfio.rb	(revision 25425)
+++ test/scanf/test_scanfio.rb	(revision 25426)
@@ -7,13 +7,14 @@
 
 require "scanf"
 
-class TestScanfIO
+class TestScanfIO < Test::Unit::TestCase
   def test_io
     fh = File.new(File.join(File.dirname(__FILE__), "data.txt"), "r")
     assert_equal(0, fh.pos)
     assert_equal(["this", "is"], fh.scanf("%s%s"))
-    assert_equal([33, "littel"], fh.scanf("%da fun%s"))
-    #p fh.pos
+    assert_equal([33, "little"], fh.scanf("%da fun%s"))
+  ensure
+    fh.close
   end
 end
 

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

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