diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-09 10:45:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-09 10:45:18 +0000 |
commit | 040a83d83e3e56f71ca7002ed8330bb56ba36e08 (patch) | |
tree | a121b96117db3460aec4a7f31a5a112c4092b907 /test/io/console/test_io_console.rb | |
parent | 1263f82a592d334e0ed4d03fb5b350b4733ca398 (diff) | |
download | ruby-040a83d83e3e56f71ca7002ed8330bb56ba36e08.tar.gz |
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
Diffstat (limited to 'test/io/console/test_io_console.rb')
-rw-r--r-- | test/io/console/test_io_console.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 972525043c..ba9063e1b3 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -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 |