mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
* test/ruby/test_rubyoptions.rb (test_script_from_stdin): disable
echo. [ruby-dev:41966] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9b0b9ac237
commit
3583c42c71
2 changed files with 28 additions and 18 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Aug 12 00:19:53 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* test/ruby/test_rubyoptions.rb (test_script_from_stdin): disable
|
||||||
|
echo. [ruby-dev:41966]
|
||||||
|
|
||||||
Wed Aug 11 23:28:22 2010 Kenta Murata <mrkn@mrkn.jp>
|
Wed Aug 11 23:28:22 2010 Kenta Murata <mrkn@mrkn.jp>
|
||||||
|
|
||||||
* lib/cmath.rb (CMath.sqrt): use floating-point value.
|
* lib/cmath.rb (CMath.sqrt): use floating-point value.
|
||||||
|
|
|
@ -434,25 +434,30 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
result = nil
|
result = nil
|
||||||
s, w = IO.pipe
|
IO.pipe {|r, w|
|
||||||
PTY.spawn(EnvUtil.rubybin, out: w) do |r, m|
|
PTY.open {|m, s|
|
||||||
w.close
|
m.echo = false
|
||||||
m.print("\C-d")
|
m.print("\C-d")
|
||||||
assert_nothing_raised('[ruby-dev:37798]') do
|
pid = spawn(EnvUtil.rubybin, :in => s, :out => w)
|
||||||
result = Timeout.timeout(3) {s.read}
|
w.close
|
||||||
end
|
assert_nothing_raised('[ruby-dev:37798]') do
|
||||||
end
|
result = Timeout.timeout(3) {r.read}
|
||||||
s.close
|
end
|
||||||
|
Process.wait pid
|
||||||
|
}
|
||||||
|
}
|
||||||
assert_equal("", result, '[ruby-dev:37798]')
|
assert_equal("", result, '[ruby-dev:37798]')
|
||||||
s, w = IO.pipe
|
IO.pipe {|r, w|
|
||||||
PTY.spawn(EnvUtil.rubybin, out: w) do |r, m|
|
PTY.open {|m, s|
|
||||||
w.close
|
m.echo = false
|
||||||
m.print("$stdin.read; p $stdin.gets\n\C-d")
|
pid = spawn(EnvUtil.rubybin, :in => s, :out => w)
|
||||||
m.print("abc\n\C-d")
|
w.close
|
||||||
m.print("zzz\n")
|
m.print("$stdin.read; p $stdin.gets\n\C-d")
|
||||||
result = s.read
|
m.print("abc\n\C-d")
|
||||||
end
|
m.print("zzz\n")
|
||||||
s.close
|
result = r.read
|
||||||
|
}
|
||||||
|
}
|
||||||
assert_equal("\"zzz\\n\"\n", result, '[ruby-core:30910]')
|
assert_equal("\"zzz\\n\"\n", result, '[ruby-core:30910]')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue