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

ruby-changes:15634

From: nobu <ko1@a...>
Date: Thu, 29 Apr 2010 20:10:45 +0900 (JST)
Subject: [ruby-changes:15634] Ruby:r27549 (trunk): * test/test_open3.rb (test_commandline): use dump instead of

nobu	2010-04-29 20:10:18 +0900 (Thu, 29 Apr 2010)

  New Revision: 27549

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

  Log:
    * test/test_open3.rb (test_commandline): use dump instead of
      shellwords.  [ruby-core:23797]

  Modified files:
    trunk/ChangeLog
    trunk/test/test_open3.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27548)
+++ ChangeLog	(revision 27549)
@@ -1,3 +1,8 @@
+Thu Apr 29 20:10:14 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* test/test_open3.rb (test_commandline): use dump instead of
+	  shellwords.  [ruby-core:23797]
+
 Thu Apr 29 18:39:51 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/thwait.rb (ThreadsWait#join): refined rdoc again.
Index: test/test_open3.rb
===================================================================
--- test/test_open3.rb	(revision 27548)
+++ test/test_open3.rb	(revision 27549)
@@ -1,6 +1,5 @@
 require 'test/unit'
 require 'open3'
-require 'shellwords'
 require_relative 'ruby/envutil'
 
 class TestOpen3 < Test::Unit::TestCase
@@ -60,8 +59,7 @@
   end
 
   def test_commandline
-    skip "Shellwords is not supported" if /mswin|mingw/ =~ RUBY_PLATFORM
-    commandline = Shellwords.join([RUBY, '-e', 'print "quux"'])
+    commandline = [RUBY, '-e', 'print :quux'].map{|s|/\s/=~s ? s.dump : s}.join(' ')
     Open3.popen3(commandline) {|i,o,e,t|
       assert_equal("quux", o.read)
     }

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

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