aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2009-11-18 15:43:00 -0800
committerAdam Vandenberg2009-11-18 15:43:00 -0800
commit6e7731aeff1195a55a88ce88dc44d0ac870f31aa (patch)
tree2fd7c0cb8cca27b0a4494089dbd0172d974f48e5 /Library
parent47a38f49f1e12fe0b0998f905e06ff8305254ac2 (diff)
downloadbrew-6e7731aeff1195a55a88ce88dc44d0ac870f31aa.tar.bz2
Add test for legacy prefix quoting.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/test/formula_test.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/Library/Homebrew/test/formula_test.rb b/Library/Homebrew/test/formula_test.rb
index c79c62571..c9033390a 100755
--- a/Library/Homebrew/test/formula_test.rb
+++ b/Library/Homebrew/test/formula_test.rb
@@ -39,11 +39,22 @@ class FormulaNames <Test::Unit::TestCase
end
end
-class CommentedTemplateCode <Test::Unit::TestCase
+class WellKnownCodeIssues <Test::Unit::TestCase
def test_for_commented_out_cmake
Dir["#{HOMEBREW_PREFIX}/Library/Formula/*.rb"].each do |f|
result = `grep "# depends_on 'cmake'" "#{f}"`.strip
assert_equal('', result, "Commented template code still in #{f}")
end
end
-end \ No newline at end of file
+
+ def test_for_misquoted_prefix
+ # Prefix should not have single quotes if the system args are already separated
+ target_string = "[\\\"]--prefix=[\\']"
+
+ Dir["#{HOMEBREW_PREFIX}/Library/Formula/*.rb"].each do |f|
+ result = `grep -e "#{target_string}" "#{f}"`.strip
+ assert_equal('', result, "--prefix is incorrectly single-quoted in #{f}")
+ end
+ end
+
+end