1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-11-12 02:32:16 +00:00
parent f2708ce30f
commit 632652a244
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Sat Nov 12 11:19:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.
Sat Nov 12 11:18:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* test/ruby/test_io.rb (test_fcntl_lock_freebsd): add a testcase

View file

@ -1918,6 +1918,17 @@ End
end
end
def test_fcntl_dupfd
Tempfile.open(self.class.name) do |f|
fd = f.fcntl(Fcntl::F_DUPFD, 500)
begin
assert_equal(fd, 500)
ensure
IO.for_fd(fd).close
end
end
end
def test_cross_thread_close_fd
skip "cross thread close causes hung-up if pipe." if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM
with_pipe do |r,w|