diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-22 11:46:24 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-22 11:46:24 +0000 |
commit | 856dc678f84dbd0253f5e0e4c93e82b03d4d58f9 (patch) | |
tree | a5c4f6b3462a6c2b204abf46968f883a52d9f68b /test | |
parent | e3a57e06de2745670dba98fb917a29b552f17061 (diff) | |
download | ruby-856dc678f84dbd0253f5e0e4c93e82b03d4d58f9.tar.gz |
refix the point is seek
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 12 |
1 files changed, 8 insertions, 4 deletions
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 |