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

ruby-changes:23895

From: akr <ko1@a...>
Date: Wed, 6 Jun 2012 21:11:55 +0900 (JST)
Subject: [ruby-changes:23895] akr:r35946 (trunk): add a test.

akr	2012-06-06 21:11:45 +0900 (Wed, 06 Jun 2012)

  New Revision: 35946

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

  Log:
    add a test.

  Modified files:
    trunk/test/ruby/test_process.rb

Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 35945)
+++ test/ruby/test_process.rb	(revision 35946)
@@ -870,6 +870,25 @@
     }
   end
 
+  def test_popen_wordsplit_beginning_and_trailing_spaces
+    with_tmpchdir {|d|
+      write_file("script", <<-'End')
+        print "fufumm pid=#{$$} ppid=#{Process.ppid}"
+        exit 7
+      End
+      str = " #{RUBY} script "
+      io = IO.popen(str)
+      pid = io.pid
+      result = io.read
+      io.close
+      status = $?
+      assert_equal(pid, status.pid)
+      assert(status.exited?)
+      assert_equal(7, status.exitstatus)
+      assert_equal("fufumm pid=#{status.pid} ppid=#{$$}", result)
+    }
+  end
+
   def test_exec_wordsplit
     with_tmpchdir {|d|
       write_file("script", <<-'End')

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

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