mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/test_open3.rb (test_commandline): use dump instead of
shellwords. [ruby-core:23797] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fb9e836857
commit
6c33ace12c
2 changed files with 6 additions and 3 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Apr 29 20:10:14 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/test_open3.rb (test_commandline): use dump instead of
|
||||||
|
shellwords. [ruby-core:23797]
|
||||||
|
|
||||||
Thu Apr 29 18:39:51 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Apr 29 18:39:51 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/thwait.rb (ThreadsWait#join): refined rdoc again.
|
* lib/thwait.rb (ThreadsWait#join): refined rdoc again.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'open3'
|
require 'open3'
|
||||||
require 'shellwords'
|
|
||||||
require_relative 'ruby/envutil'
|
require_relative 'ruby/envutil'
|
||||||
|
|
||||||
class TestOpen3 < Test::Unit::TestCase
|
class TestOpen3 < Test::Unit::TestCase
|
||||||
|
|
@ -60,8 +59,7 @@ class TestOpen3 < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_commandline
|
def test_commandline
|
||||||
skip "Shellwords is not supported" if /mswin|mingw/ =~ RUBY_PLATFORM
|
commandline = [RUBY, '-e', 'print :quux'].map{|s|/\s/=~s ? s.dump : s}.join(' ')
|
||||||
commandline = Shellwords.join([RUBY, '-e', 'print "quux"'])
|
|
||||||
Open3.popen3(commandline) {|i,o,e,t|
|
Open3.popen3(commandline) {|i,o,e,t|
|
||||||
assert_equal("quux", o.read)
|
assert_equal("quux", o.read)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue