From 185c85b26e324295e49650853f0414477dda44bd Mon Sep 17 00:00:00 2001 From: odaira Date: Tue, 7 Oct 2014 19:33:48 +0000 Subject: test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding): On AIX, locale_charmap is ISO-8859-1 with LANG=C. This means the source encoding of stdin is ISO-8859-1, so "invalid multibyte char" error does not occur git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rubyoptions.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 22bbcf02ed..2dc7a0b315 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -209,10 +209,12 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err(%w(--encoding test_ruby_test_rubyoptions_foobarbazqux), "", [], /unknown encoding name - test_ruby_test_rubyoptions_foobarbazqux \(RuntimeError\)/) - if /mswin|mingw/ =~ RUBY_PLATFORM && + if /mswin|mingw|aix/ =~ RUBY_PLATFORM && (str = "\u3042".force_encoding(Encoding.find("locale"))).valid_encoding? # This result depends on locale because LANG=C doesn't affect locale # on Windows. + # On AIX, the source encoding of stdin with LANG=C is ISO-8859-1, + # which allows \u3042. out, err = [str], [] else out, err = [], /invalid multibyte char/ -- cgit v1.2.3