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

ruby-changes:37105

From: akr <ko1@a...>
Date: Fri, 9 Jan 2015 00:38:27 +0900 (JST)
Subject: [ruby-changes:37105] akr:r49186 (trunk): Add a test.

akr	2015-01-09 00:38:13 +0900 (Fri, 09 Jan 2015)

  New Revision: 49186

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

  Log:
    Add a test.

  Modified files:
    trunk/test/test_open3.rb
Index: test/test_open3.rb
===================================================================
--- test/test_open3.rb	(revision 49185)
+++ test/test_open3.rb	(revision 49186)
@@ -80,9 +80,17 @@ class TestOpen3 < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_open3.rb#L80
     end
   end
 
-  def test_numeric_file_descriptors
+  def test_numeric_file_descriptor2
+    with_pipe {|r, w|
+      Open3.popen2(RUBY, '-e', 'STDERR.puts "foo"', 2 => w) {|i,o,t|
+        assert_equal("foo\n", r.gets)
+      }
+    }
+  end
+
+  def test_numeric_file_descriptor3
     skip "passing FDs bigger than 2 is not supported on Windows" if /mswin|mingw/ =~ RUBY_PLATFORM
-    with_pipe { |r, w|
+    with_pipe {|r, w|
       Open3.popen3(RUBY, '-e', 'IO.open(3).puts "foo"', 3 => w) {|i,o,e,t|
         assert_equal("foo\n", r.gets, "[GH-808] [ruby-core:67347] [Bug #10699]")
       }

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

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