diff options
Diffstat (limited to 'test/ruby/test_dir_m17n.rb')
-rw-r--r-- | test/ruby/test_dir_m17n.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb index 33ba9e1557..b376393abf 100644 --- a/test/ruby/test_dir_m17n.rb +++ b/test/ruby/test_dir_m17n.rb @@ -214,6 +214,17 @@ class TestDir_M17N < Test::Unit::TestCase } end + def test_error_nonascii + bug6071 = '[ruby-dev:45279]' + paths = ["\u{3042}".encode("sjis"), "\u{ff}".encode("iso-8859-1")] + encs = with_tmpdir { + paths.map {|path| + Dir.open(path) rescue $!.message.encoding + } + } + assert_equal(paths.map(&:encoding), encs, bug6071) + end + def test_inspect_nonascii bug6072 = '[ruby-dev:45280]' paths = ["\u{3042}".encode("sjis"), "\u{ff}".encode("iso-8859-1")] |