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:
parent
1263f82a59
commit
040a83d83e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user