aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_ENV.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/test_ENV.rb')
-rw-r--r--Library/Homebrew/test/test_ENV.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_ENV.rb b/Library/Homebrew/test/test_ENV.rb
index 8e69cb6f0..1a1dd922b 100644
--- a/Library/Homebrew/test/test_ENV.rb
+++ b/Library/Homebrew/test/test_ENV.rb
@@ -26,4 +26,13 @@ class EnvironmentTests < Test::Unit::TestCase
assert_nil ENV['LD']
assert_equal ENV['OBJC'], ENV['CC']
end
+
+ def test_with_build_environment
+ before = ENV.to_hash
+ ENV.with_build_environment do
+ ENV['foo'] = 'bar'
+ end
+ assert_nil ENV['foo']
+ assert_equal before, ENV.to_hash
+ end
end