diff options
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 |
