ruby-changes:40921
From: nobu <ko1@a...>
Date: Wed, 9 Dec 2015 19:45:39 +0900 (JST)
Subject: [ruby-changes:40921] nobu:r53000 (trunk): test_io_console.rb: wait
nobu 2015-12-09 19:45:18 +0900 (Wed, 09 Dec 2015) New Revision: 53000 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53000 Log: 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. Modified files: trunk/test/io/console/test_io_console.rb Index: test/io/console/test_io_console.rb =================================================================== --- test/io/console/test_io_console.rb (revision 52999) +++ test/io/console/test_io_console.rb (revision 53000) @@ -185,7 +185,8 @@ class TestIO_Console < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L185 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/