diff --git a/test/test_pty.rb b/test/test_pty.rb index 1c0c6fb3e8..81b0d394ff 100644 --- a/test/test_pty.rb +++ b/test/test_pty.rb @@ -12,7 +12,7 @@ class TestPTY < Test::Unit::TestCase RUBY = EnvUtil.rubybin def test_spawn_without_block - r, w, pid = PTY.spawn(RUBY, '-e', 'puts "a"') + r, w, pid = PTY.spawn(RUBY, '-e', 'puts "a"; sleep 0.1') rescue RuntimeError omit $! else @@ -24,7 +24,7 @@ class TestPTY < Test::Unit::TestCase end def test_spawn_with_block - PTY.spawn(RUBY, '-e', 'puts "b"') {|r,w,pid| + PTY.spawn(RUBY, '-e', 'puts "b"; sleep 0.1') {|r,w,pid| begin assert_equal("b\r\n", r.gets) ensure @@ -38,7 +38,7 @@ class TestPTY < Test::Unit::TestCase end def test_commandline - commandline = Shellwords.join([RUBY, '-e', 'puts "foo"']) + commandline = Shellwords.join([RUBY, '-e', 'puts "foo"; sleep 0.1']) PTY.spawn(commandline) {|r,w,pid| begin assert_equal("foo\r\n", r.gets) @@ -53,7 +53,7 @@ class TestPTY < Test::Unit::TestCase end def test_argv0 - PTY.spawn([RUBY, "argv0"], '-e', 'puts "bar"') {|r,w,pid| + PTY.spawn([RUBY, "argv0"], '-e', 'puts "bar"; sleep 0.1') {|r,w,pid| begin assert_equal("bar\r\n", r.gets) ensure