1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/ruby/test_rubyoptions.rb (test_encoding): skipped on Android

On Android, nl_langinfo() always returns UTF-8 even when LANG is C.
This commit is contained in:
Yusuke Endoh 2019-10-11 21:39:21 +09:00
parent f3c4e620ac
commit 9e4a53fe13

View file

@ -287,7 +287,7 @@ 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|aix/ =~ RUBY_PLATFORM &&
if /mswin|mingw|aix|android/ =~ 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.