test_utils: add with_custom_locale test

This commit is contained in:
Dominyk Tiller 2016-08-01 04:21:08 +01:00
parent de4016e049
commit 774eefa8ae
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -78,6 +78,14 @@ class UtilTests < Homebrew::TestCase
end
end
def test_with_custom_locale
ENV["LC_ALL"] = "en_US.UTF-8"
with_custom_locale("C") do
assert_equal "C", ENV["LC_ALL"]
end
assert_equal "en_US.UTF-8", ENV["LC_ALL"]
end
def test_run_as_not_developer
ENV["HOMEBREW_DEVELOPER"] = "foo"
run_as_not_developer do