From 856dc678f84dbd0253f5e0e4c93e82b03d4d58f9 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 22 Apr 2014 11:46:24 +0000 Subject: refix the point is seek git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/ruby/test_io.rb') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index e5c8f99013..a0b0a1bcde 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1693,8 +1693,10 @@ class TestIO < Test::Unit::TestCase 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 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 -- cgit v1.2.3