1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_io_console.rb: wait

* test/io/console/test_io_console.rb (test_getpass): wait for the
  child process to read the input, not to read it by the master
  itself.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-12-09 10:45:18 +00:00
parent 1263f82a59
commit 040a83d83e

View file

@ -185,7 +185,8 @@ class TestIO_Console < Test::Unit::TestCase
run_pty("p IO.console.getpass('> ')") do |r, w|
assert_equal("> ", r.readpartial(10))
w.print "asdf\n"
assert_include(r.gets, "\n")
sleep 1
assert_equal("\r\n", r.gets)
assert_equal("\"asdf\"", r.gets.chomp)
end
end