diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 01:09:37 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 01:09:37 +0000 |
commit | e2630984e947f89a7ce198c60256fffc3b64cabd (patch) | |
tree | 5c2f98dae027284989b8340595b5e877a7c34bca | |
parent | c806d3f53f65b9dc43bfc4636f047b7a86757246 (diff) | |
download | ruby-e2630984e947f89a7ce198c60256fffc3b64cabd.tar.gz |
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_io_m17n.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 16dc9f232e..4fdbc1a2ac 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -66,6 +66,17 @@ EOT } end + def test_nonascii_terminator + with_tmpdir { + generate_file('tmp', "before \xA2\xA2 after") + open("tmp", "r:euc-jp") {|f| + assert_raise(ArgumentError) { + f.gets("\xA2\xA2".force_encoding("utf-8")) + } + } + } + end + def test_pipe_terminator_conversion with_pipe("euc-jp:utf-8") {|r, w| w.write "before \xa2\xa2 after" |