aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_integration_cmds.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-09-04 21:23:33 +0100
committerGitHub2016-09-04 21:23:33 +0100
commitdfcbefff73e90eda5801d9892303e10fc31831b6 (patch)
treee20a7c5a5a28458d7729155c2b537ac63bc0aadd /Library/Homebrew/test/test_integration_cmds.rb
parent8e98a0a198551f19696b3c09469fcbb1e1223f73 (diff)
parentdcc3377aa30b34dfcced0df77696674f91a5a9f3 (diff)
downloadbrew-dfcbefff73e90eda5801d9892303e10fc31831b6.tar.bz2
Merge pull request #201 from gregory-nisbet/feature-env-shells
--env: support more shells, allow explicit shell selection
Diffstat (limited to 'Library/Homebrew/test/test_integration_cmds.rb')
-rw-r--r--Library/Homebrew/test/test_integration_cmds.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb
index 95b1b4b5f..c83d7522a 100644
--- a/Library/Homebrew/test/test_integration_cmds.rb
+++ b/Library/Homebrew/test/test_integration_cmds.rb
@@ -227,6 +227,26 @@ class IntegrationCommandTests < Homebrew::TestCase
cmd("--env"))
end
+ def test_env_bash
+ assert_match %r{export CMAKE_PREFIX_PATH="#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"},
+ cmd("--env", "--shell=bash")
+ end
+
+ def test_env_fish
+ assert_match %r{set [-]gx CMAKE_PREFIX_PATH "#{Regexp.quote(HOMEBREW_PREFIX.to_s)}"},
+ cmd("--env", "--shell=fish")
+ end
+
+ def test_env_csh
+ assert_match %r{setenv CMAKE_PREFIX_PATH #{Regexp.quote(HOMEBREW_PREFIX.to_s)};},
+ cmd("--env", "--shell=tcsh")
+ end
+
+ def test_env_plain
+ assert_match %r{CMAKE_PREFIX_PATH: #{Regexp.quote(HOMEBREW_PREFIX)}},
+ cmd("--env", "--plain")
+ end
+
def test_prefix_formula
assert_match "#{HOMEBREW_CELLAR}/testball",
cmd("--prefix", testball)