aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMisty De Meo2017-02-26 14:53:00 +1100
committerMisty De Meo2017-02-26 21:16:43 +1100
commit177aefdf555488653572f1f98bf4d6d8c7a03671 (patch)
treeb3eebcfd1dbeb4357ccfe1805a03a62974ece998 /Library/Homebrew/test
parentfd4fd18277d1ad95c825edefaa6e0db008cd8dd5 (diff)
downloadbrew-177aefdf555488653572f1f98bf4d6d8c7a03671.tar.bz2
xcodebuild audit: match xcodebuild with no args
Closes #2199. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/audit_test.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/Library/Homebrew/test/audit_test.rb b/Library/Homebrew/test/audit_test.rb
index 1d93c31e0..f4b7cae4a 100644
--- a/Library/Homebrew/test/audit_test.rb
+++ b/Library/Homebrew/test/audit_test.rb
@@ -465,4 +465,38 @@ class FormulaAuditorTests < Homebrew::TestCase
end
end
end
+
+ def test_audit_xcodebuild_suggests_symroot
+ fa = formula_auditor "foo", <<-EOS.undent
+ class Foo < Formula
+ url "http://example.com/foo-1.0.tgz"
+ homepage "http://example.com"
+
+ def install
+ xcodebuild "-project", "meow.xcodeproject"
+ end
+ end
+ EOS
+
+ fa.audit_text
+
+ assert_match 'xcodebuild should be passed an explicit "SYMROOT"', fa.problems.first
+ end
+
+ def test_audit_bare_xcodebuild_suggests_symroot_also
+ fa = formula_auditor "foo", <<-EOS.undent
+ class Foo < Formula
+ url "http://example.com/foo-1.0.tgz"
+ homepage "http://example.com"
+
+ def install
+ xcodebuild
+ end
+ end
+ EOS
+
+ fa.audit_text
+
+ assert_match 'xcodebuild should be passed an explicit "SYMROOT"', fa.problems.first
+ end
end