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 | 32b1dc88426a0462354c4ae0e8e178f3b5d47cd6 (patch) | |
| tree | 5c2f98dae027284989b8340595b5e877a7c34bca /test/ruby | |
| parent | a5314e45d027dd81cd9eb4945ed669367d3ffa83 (diff) | |
| download | ruby-32b1dc88426a0462354c4ae0e8e178f3b5d47cd6.tar.gz ruby-32b1dc88426a0462354c4ae0e8e178f3b5d47cd6.tar.xz ruby-32b1dc88426a0462354c4ae0e8e178f3b5d47cd6.zip | |
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -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 16dc9f232..4fdbc1a2a 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" |
