summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorodaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-07 19:33:48 +0000
committerodaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-07 19:33:48 +0000
commit185c85b26e324295e49650853f0414477dda44bd (patch)
tree6e5c680f782b52cde296fd273249cf9bc960449b
parent56d5728589f9cfea6e1d923d5faab8f1b982d29d (diff)
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
-rw-r--r--ChangeLog7
-rw-r--r--test/ruby/test_rubyoptions.rb4
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a860bf88df..2dc3608a9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
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/