diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-16 12:15:32 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-16 12:15:32 +0000 |
commit | 49f9df123e4c8cc419cec564c16761eba89a194e (patch) | |
tree | d4e01020d2be5a57b28d59254d08faf248179504 /test | |
parent | 5b86607ebd3180dfaf5a11b261b03fa40e7ebf4e (diff) |
merges r27762 from trunk into ruby_1_9_2.
--
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 45f639f7b2..e7a9d6b1ad 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -1775,15 +1775,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 |