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
This commit is contained in:
parent
56d5728589
commit
185c85b26e
@ -1,3 +1,10 @@
|
||||
Wed Oct 8 04:33:04 2014 Rei Odaira <Rei.Odaira@gmail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Oct 8 04:30:29 2014 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* lib/matrix.rb: Add Matrix#laplace_expansion.
|
||||
|
@ -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/
|
||||
|
Loading…
x
Reference in New Issue
Block a user