From 040a83d83e3e56f71ca7002ed8330bb56ba36e08 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 9 Dec 2015 10:45:18 +0000 Subject: 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 --- test/io/console/test_io_console.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') 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 -- cgit v1.2.3