summaryrefslogtreecommitdiff
path: root/test/ruby/test_argf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-28 06:18:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-28 06:18:30 +0000
commit58c2571b597b278e93362f86983b18f7d8c19ad2 (patch)
tree90fe8a70b6ac1c65b2fb834b88d5d8baf26c9101 /test/ruby/test_argf.rb
parentffa153f282b8fb94734a3b33ba83cc8566a0231f (diff)
io.c: preserve encodings
* io.c (argf_next_argv): preserve encodings in warning messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_argf.rb')
-rw-r--r--test/ruby/test_argf.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb
index fb869561a1..95d694116f 100644
--- a/test/ruby/test_argf.rb
+++ b/test/ruby/test_argf.rb
@@ -212,6 +212,13 @@ class TestArgf < Test::Unit::TestCase
assert_equal([], r)
assert_equal("foo\nbar\nbaz\n", File.read(t.path))
end
+
+ base = "argf-\u{30c6 30b9 30c8}"
+ name = "#{@tmpdir}/#{base}"
+ File.write(name, "foo")
+ argf = ARGF.class.new(name)
+ argf.inplace_mode = '/\\:'
+ assert_warning(/#{base}/) {argf.gets}
end
def test_inplace_no_backup