[前][次][番号順一覧][スレッド一覧]

ruby-changes:21671

From: kosaki <ko1@a...>
Date: Sat, 12 Nov 2011 11:32:25 +0900 (JST)
Subject: [ruby-changes:21671] kosaki:r33720 (trunk): * test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.

kosaki	2011-11-12 11:32:16 +0900 (Sat, 12 Nov 2011)

  New Revision: 33720

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33720

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

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_io.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33719)
+++ ChangeLog	(revision 33720)
@@ -1,3 +1,7 @@
+Sat Nov 12 11:19:35 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.
+
 Sat Nov 12 11:18:17 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* test/ruby/test_io.rb (test_fcntl_lock_freebsd): add a testcase
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 33719)
+++ test/ruby/test_io.rb	(revision 33720)
@@ -1918,6 +1918,17 @@
     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|

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]