aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorDominyk Tiller2016-08-01 04:21:08 +0100
committerDominyk Tiller2016-08-02 03:50:49 +0100
commit774eefa8aecff313ae809f62b625bbedf41c07af (patch)
treeed5498ab2510998be493a349923d819fd0e404a8 /Library/Homebrew/test
parentde4016e0496b05d20d35d3dabbe328b7f32781d6 (diff)
downloadbrew-774eefa8aecff313ae809f62b625bbedf41c07af.tar.bz2
test_utils: add with_custom_locale test
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_utils.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_utils.rb b/Library/Homebrew/test/test_utils.rb
index 559e60c94..9b55965b5 100644
--- a/Library/Homebrew/test/test_utils.rb
+++ b/Library/Homebrew/test/test_utils.rb
@@ -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