diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-29 12:06:42 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-29 12:06:42 +0000 |
commit | c637e7b458e0b17dff3c67937b4fe1ba656d656c (patch) | |
tree | cd52a66aa55bf1e0f767bc9d1264b25d50a19620 | |
parent | 7d61b7e13fd848449770f2226a7dc7dbd41fadfd (diff) | |
download | ruby-c637e7b458e0b17dff3c67937b4fe1ba656d656c.tar.gz |
* test/ruby/test_rubyoptions.rb (TestRubyOptions::test_script_from_stdin):
As usual, PTY is not always available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 24 |
2 files changed, 19 insertions, 10 deletions
@@ -1,3 +1,8 @@ +Wed Sep 29 21:04:05 2010 URABE Shyouhei <shyouhei@ruby-lang.org> + + * test/ruby/test_rubyoptions.rb (TestRubyOptions::test_script_from_stdin): + As usual, PTY is not always available. + Wed Sep 29 18:38:14 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * tool/config.sub (x64): regularize only for pc vendor, and strip diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 459e316016..82ff0258e7 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -435,16 +435,20 @@ class TestRubyOptions < Test::Unit::TestCase require 'timeout' result = nil IO.pipe {|r, w| - PTY.open {|m, s| - m.echo = false - m.print("\C-d") - pid = spawn(EnvUtil.rubybin, :in => s, :out => w) - w.close - assert_nothing_raised('[ruby-dev:37798]') do - result = Timeout.timeout(3) {r.read} - end - Process.wait pid - } + begin + PTY.open {|m, s| + m.echo = false + m.print("\C-d") + pid = spawn(EnvUtil.rubybin, :in => s, :out => w) + w.close + assert_nothing_raised('[ruby-dev:37798]') do + result = Timeout.timeout(3) {r.read} + end + Process.wait pid + } + rescue RuntimeError + skip $! + end } assert_equal("", result, '[ruby-dev:37798]') IO.pipe {|r, w| |