зеркало из https://github.com/github/ruby.git
test_io.rb: defer f_type
* test/ruby/test_io.rb (test_seek, test_seek_symwhence): defer File::Statfs#type call which may not be implemented, to mitigate errors on platforms where SEEK_DATA is available but f_type in struct statfs is not. [ruby-dev:48154] [Bug #9789] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d42e0ea844
Коммит
d1c0375526
|
@ -1,3 +1,10 @@
|
|||
Fri May 2 11:32:51 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_io.rb (test_seek, test_seek_symwhence): defer
|
||||
File::Statfs#type call which may not be implemented, to mitigate
|
||||
errors on platforms where SEEK_DATA is available but f_type in
|
||||
struct statfs is not. [ruby-dev:48154] [Bug #9789]
|
||||
|
||||
Fri May 2 10:37:55 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (rb_id_attrset): turn dynamically interned Symbol into
|
||||
|
|
|
@ -1715,7 +1715,7 @@ class TestIO < Test::Unit::TestCase
|
|||
open(t.path) { |f|
|
||||
break unless can_seek_data(f)
|
||||
assert_equal("foo\n", f.gets)
|
||||
assert_nothing_raised("cannot SEEK_DATA on FS(0x%X)" % f.statfs.type) do
|
||||
assert_nothing_raised(proc {"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)
|
||||
|
@ -1765,7 +1765,7 @@ class TestIO < Test::Unit::TestCase
|
|||
open(t.path) { |f|
|
||||
break unless can_seek_data(f)
|
||||
assert_equal("foo\n", f.gets)
|
||||
assert_nothing_raised("cannot SEEK_DATA on FS(0x%X)" % f.statfs.type) do
|
||||
assert_nothing_raised(proc {"cannot SEEK_DATA on FS(0x%X)" % f.statfs.type}) do
|
||||
f.seek(0, :DATA)
|
||||
end
|
||||
assert_equal("foo\nbar\nbaz\n", f.read)
|
||||
|
|
Загрузка…
Ссылка в новой задаче