diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2020-02-13 22:58:15 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2020-02-13 23:00:03 +0900 |
commit | 022268ae009bd87b13e1f5ee46011b7142987d57 (patch) | |
tree | 403e991aba7490d168e0e3b08154eefc755001d0 /spec/ruby | |
parent | a11fa7d8cd424e60b34a1c03cc18abee17203576 (diff) | |
download | ruby-022268ae009bd87b13e1f5ee46011b7142987d57.tar.gz |
spec/ruby/core/encoding/locale_charmap_spec.rb: locale_charmap is UTF-8 on Android
nl_langinfo(CODESET) always returns UTF-8 on Android, regardless to
LC_ALL=C.
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/encoding/locale_charmap_spec.rb | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/spec/ruby/core/encoding/locale_charmap_spec.rb b/spec/ruby/core/encoding/locale_charmap_spec.rb index 5963a8beb5..8143b9083a 100644 --- a/spec/ruby/core/encoding/locale_charmap_spec.rb +++ b/spec/ruby/core/encoding/locale_charmap_spec.rb @@ -7,11 +7,13 @@ describe "Encoding.locale_charmap" do # FIXME: Get this working on Windows platform_is :linux do - it "returns a value based on the LC_ALL environment variable" do - old_lc_all = ENV['LC_ALL'] - ENV['LC_ALL'] = 'C' - ruby_exe("print Encoding.locale_charmap").should == 'ANSI_X3.4-1968' - ENV['LC_ALL'] = old_lc_all + platform_is_not :android do + it "returns a value based on the LC_ALL environment variable" do + old_lc_all = ENV['LC_ALL'] + ENV['LC_ALL'] = 'C' + ruby_exe("print Encoding.locale_charmap").should == 'ANSI_X3.4-1968' + ENV['LC_ALL'] = old_lc_all + end end end @@ -33,6 +35,15 @@ describe "Encoding.locale_charmap" do end end + platform_is :android do + it "always returns UTF-8" do + old_lc_all = ENV['LC_ALL'] + ENV['LC_ALL'] = 'C' + ruby_exe("print Encoding.locale_charmap").should == 'UTF-8' + ENV['LC_ALL'] = old_lc_all + end + end + platform_is :bsd, :darwin, :linux do it "is unaffected by assigning to ENV['LC_ALL'] in the same process" do old_charmap = Encoding.locale_charmap |