summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb12
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