summaryrefslogtreecommitdiff
path: root/test/io
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-13 09:45:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-13 09:45:29 +0000
commit30f637024b4a50d98d46496ca121f8d7dea946c7 (patch)
treeb916c14bce977b6dd4939a4a4ff1709ade6fe3e1 /test/io
parent8653bd97de97a43b6ae929cc808f850ebe7269cb (diff)
* ext/io/console/console.c (get_write_fd): return primary fd if no
io is tied for writing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io')
-rw-r--r--test/io/console/test_io_console.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index 2e46176616..7d919c758c 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -70,4 +70,13 @@ class TestIO_Console < Test::Unit::TestCase
}
end
+ def test_oflush
+ PTY.open {|m, s|
+ s.print "a\n"
+ s.oflush
+ s.print "b\n"
+ assert_equal("b\r\n", m.readpartial(10))
+ }
+ end
+
end