Skip to content

Commit

Permalink
test windows: don't use the default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 18, 2024
1 parent 33e7b2e commit bf674dd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_detect_general.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,22 @@ class TestDetectGeneral < Test::Unit::TestCase
def setup
Locale.init
Locale.clear_all
if Locale::Driver.const_defined?(:Win32)
Locale::Driver::Win32.set_thread_locale_id(0xffff) # invalid
end
ENV["LC_ALL"] = nil
ENV["LC_CTYPE"] = nil
ENV["LC_MESSAGES"] = nil
ENV["LANG"] = nil
ENV["LANGUAGE"] = nil
end

def teardown
if Locale::Driver.const_defined?(:Win32)
Locale::Driver::Win32.set_thread_locale_id(nil)
end
end

def test_lc_all
ENV["LC_ALL"] = "ja_JP.eucJP"
ENV["LC_CTYPE"] = "fr_FR.ISO-8859-1" #Ignored.
Expand Down

0 comments on commit bf674dd

Please sign in to comment.