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

ruby-changes:33583

From: naruse <ko1@a...>
Date: Tue, 22 Apr 2014 20:46:34 +0900 (JST)
Subject: [ruby-changes:33583] naruse:r45664 (trunk): refix the point is seek

naruse	2014-04-22 20:46:24 +0900 (Tue, 22 Apr 2014)

  New Revision: 45664

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

  Log:
    refix the point is seek

  Modified files:
    trunk/test/ruby/test_io.rb
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 45663)
+++ test/ruby/test_io.rb	(revision 45664)
@@ -1693,8 +1693,10 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L1693
       if defined?(IO::SEEK_DATA)
         open(t.path) { |f|
           assert_equal("foo\n", f.gets)
-          f.seek(0, IO::SEEK_DATA)
-          assert_equal("foo\nbar\nbaz\n", f.read, "cannot SEEK_DATA at fs(#{f.statfs.type})")
+          assert_nothing_raised("cannot SEEK_DATA on FS(0x%X)" % f.statfs.type) do
+            f.seek(0, IO::SEEK_DATA)
+          end
+          assert_equal("foo\nbar\nbaz\n", f.read)
         }
         open(t.path, 'r+') { |f|
           pos = f.pos
@@ -1739,8 +1741,10 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L1741
       if defined?(IO::SEEK_DATA)
         open(t.path) { |f|
           assert_equal("foo\n", f.gets)
-          f.seek(0, :DATA)
-          assert_equal("foo\nbar\nbaz\n", f.read, "cannot SEEK_DATA at fs(#{f.statfs.type})")
+          assert_nothing_raised("cannot SEEK_DATA on FS(0x%X)" % f.statfs.type) do
+            f.seek(0, :DATA)
+          end
+          assert_equal("foo\nbar\nbaz\n", f.read)
         }
         open(t.path, 'r+') { |f|
           pos = f.pos

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

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