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

ruby-changes:36607

From: headius <ko1@a...>
Date: Wed, 3 Dec 2014 07:08:19 +0900 (JST)
Subject: [ruby-changes:36607] headius:r48688 (trunk): * test/test_open3.rb: Add a simple test for env hash on popen3.

headius	2014-12-03 07:08:05 +0900 (Wed, 03 Dec 2014)

  New Revision: 48688

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

  Log:
    * test/test_open3.rb: Add a simple test for env hash on popen3.

  Modified files:
    trunk/test/test_open3.rb
Index: test/test_open3.rb
===================================================================
--- test/test_open3.rb	(revision 48687)
+++ test/test_open3.rb	(revision 48688)
@@ -73,6 +73,13 @@ class TestOpen3 < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_open3.rb#L73
     }
   end
 
+  def test_env
+    result = Open3.popen3({'A' => 'B', 'C' => 'D'}, RUBY, '-e' 'p ENV["A"]') do |i, out, err, thr|
+      output = out.read
+      assert_equal("\"B\"\n", output)
+    end
+  end
+
   def with_pipe
     r, w = IO.pipe
     yield r, w

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

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