diff options
Diffstat (limited to 'test/io/console/test_io_console.rb')
-rw-r--r-- | test/io/console/test_io_console.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 9c2fe1ac54..d9868bf040 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -20,6 +20,21 @@ class TestIO_Console < Test::Unit::TestCase } end + def test_cooked + helper {|m, s| + s.raw { + s.print "abc\n" + assert_equal("abc\n", m.gets) + s.cooked { + s.print "def\n" + assert_equal("def\r\n", m.gets) + } + } + s.print "ghi\n" + assert_equal("ghi\r\n", m.gets) + } + end + def test_echo helper {|m, s| assert(s.echo?) |