diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 14:16:13 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 14:16:13 +0000 |
commit | 48eb4a79239d5107922bea702b63db9099a402d6 (patch) | |
tree | 36ac6b392a0fc24c375f41598f76449cf5d24db1 | |
parent | 54c0e4b76e139af4bdc689089a663df53ae12cb2 (diff) | |
download | ruby-48eb4a79239d5107922bea702b63db9099a402d6.tar.gz |
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_io_m17n.rb | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 218a60b044..f5b1de602e 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -1774,15 +1774,22 @@ EOT } end - def test_cbuf_select - with_tmpdir { - r, w = IO.pipe - w << "\r\n" - r.set_encoding("US-ASCII:UTF-8", :universal_newline => true) - r.ungetc(r.getc) - assert_equal([[r],[],[]], IO.select([r], nil, nil, 1)) - } + r, w = IO.pipe + w << "\r\n" + r.set_encoding("US-ASCII:UTF-8", :universal_newline => true) + r.ungetc(r.getc) + assert_equal([[r],[],[]], IO.select([r], nil, nil, 1)) end + + def test_textmode_paragraphmode + r, w = IO.pipe + w << "a\n\n\nc".gsub(/\n/, "\r\n") + w.close + r.set_encoding("US-ASCII:UTF-8", :universal_newline => true) + assert_equal("a\n\n", r.gets("")) + assert_equal("c", r.gets(""), "[ruby-core:23723] (18)") + end + end |