[ruby-dev:48157] [ruby-trunk - Bug #9789] Error in TestIO#test_seek_symwhence and TestIO#test_seek on systems without File::Statfs#type (e.g. Solaris)
From:
nobu@...
Date:
2014-04-30 16:44:18 UTC
List:
ruby-dev #48157
Issue #9789 has been updated by Nobuyoshi Nakada.
Category set to core
Assignee set to Naohisa Goto
Target version set to current: 2.2.0
Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED
`IO::SEEK_DATA`自体はうごくんでしょうか。
~~~diff
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index d2abd9e..5ed2ddd 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -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)
~~~
----------------------------------------
Bug #9789: Error in TestIO#test_seek_symwhence and TestIO#test_seek on systems without File::Statfs#type (e.g. Solaris)
https://bugs.ruby-lang.org/issues/9789#change-46415
* Author: Naohisa Goto
* Status: Open
* Priority: Normal
* Assignee: Naohisa Goto
* Category: core
* Target version: current: 2.2.0
* ruby -v: ruby 2.2.0dev (2014-04-30) [sparc64-solaris2.10]
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED
----------------------------------------
File::Statfs#type が無い(NotImplementedErrorになる)環境にて、
TestIO#test_seek_symwhence と TestIO#test_seek がエラーになります。
Solaris 10 (64ビット)、r45760 (+ Bug #9788 のパッチ)にて確認しました。
~~~
52) Error:
TestIO#test_seek_symwhence:
NotImplementedError: type() function is unimplemented on this machine
/XXXXXXXXXX/test/ruby/test_io.rb:1768:in `type'
/XXXXXXXXXX/test/ruby/test_io.rb:1768:in `block (2 levels) in test_seek_symwhence'
/XXXXXXXXXX/lib/open-uri.rb:36:in `open'
/XXXXXXXXXX/lib/open-uri.rb:36:in `open'
/XXXXXXXXXX/test/ruby/test_io.rb:1765:in `block in test_seek_symwhence'
/XXXXXXXXXX/test/ruby/test_io.rb:1432:in `make_tempfile'
/XXXXXXXXXX/test/ruby/test_io.rb:1747:in `test_seek_symwhence'
53) Error:
TestIO#test_seek:
NotImplementedError: type() function is unimplemented on this machine
/XXXXXXXXXX/test/ruby/test_io.rb:1718:in `type'
/XXXXXXXXXX/test/ruby/test_io.rb:1718:in `block (2 levels) in test_seek'
/XXXXXXXXXX/lib/open-uri.rb:36:in `open'
/XXXXXXXXXX/lib/open-uri.rb:36:in `open'
/XXXXXXXXXX/test/ruby/test_io.rb:1715:in `block in test_seek'
/XXXXXXXXXX/test/ruby/test_io.rb:1432:in `make_tempfile'
/XXXXXXXXXX/test/ruby/test_io.rb:1692:in `test_seek'
~~~
--
https://bugs.ruby-lang.org/