summaryrefslogtreecommitdiff
path: root/test/ruby/test_io_m17n.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-13 09:49:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-13 09:49:25 +0000
commitadd73a87136653409abd0df39e2f2a8ec50a0cf7 (patch)
tree3df564064ec85b577b83881117ffb73055d8e7d4 /test/ruby/test_io_m17n.rb
parentb861d5473cfa1f3aa64979d9ff0655230eea9a14 (diff)
io.c: encoding in warnings
* io.c (parse_mode_enc): preserve encoding of mode string in warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r--test/ruby/test_io_m17n.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index fb99c0cd6d5..a91fccee5f9 100644
--- a/test/ruby/test_io_m17n.rb
+++ b/test/ruby/test_io_m17n.rb
@@ -2107,6 +2107,14 @@ EOT
open(IO::NULL, "w:bom|us-ascii") {|f| enc = f.external_encoding}
}
assert_equal(Encoding::US_ASCII, enc)
+
+ tlhInganHol = "\u{f8e4 f8d9 f8d7 f8dc f8d0 f8db} \u{f8d6 f8dd f8d9}"
+ EnvUtil.with_default_external(Encoding::UTF_8) {
+ assert_warn(/#{tlhInganHol}/) {
+ open(IO::NULL, "w:bom|#{tlhInganHol}") {|f| enc = f.external_encoding}
+ }
+ }
+ assert_nil(enc)
end
def test_cbuf