ruby-changes:20064
From: nobu <ko1@a...>
Date: Thu, 16 Jun 2011 09:09:09 +0900 (JST)
Subject: [ruby-changes:20064] nobu:r32111 (trunk): * test/io/console/test_io_console.rb (TestIO_Console#test_sync):
nobu 2011-06-16 09:08:56 +0900 (Thu, 16 Jun 2011) New Revision: 32111 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32111 Log: * test/io/console/test_io_console.rb (TestIO_Console#test_sync): fix for daemon process. Modified files: trunk/ChangeLog trunk/test/io/console/test_io_console.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32110) +++ ChangeLog (revision 32111) @@ -1,3 +1,8 @@ +Thu Jun 16 09:08:39 2011 Nobuyoshi Nakada <nobu@r...> + + * test/io/console/test_io_console.rb (TestIO_Console#test_sync): + fix for daemon process. + Thu Jun 16 07:58:01 2011 Shota Fukumori <sorah@t...> * test/testunit/test_parallel.rb(test_ignore_tzero): Test for r32109. Index: test/io/console/test_io_console.rb =================================================================== --- test/io/console/test_io_console.rb (revision 32110) +++ test/io/console/test_io_console.rb (revision 32111) @@ -148,9 +148,17 @@ } end - def test_sync - skip "Can't get console (because of there is no tty?)" unless IO.console - assert(helper {IO.console.sync}, "console should be unbuffered") + if IO.console + def test_sync + assert(IO.console.sync, "console should be unbuffered") + end + else + def test_sync + r, w, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", "p IO.console.class") + con = r.gets.chomp + Process.wait(pid) + assert_match("File", con) + end end private -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/