diff options
| author | Baptiste Fontaine | 2016-02-21 22:47:50 +0100 |
|---|---|---|
| committer | Baptiste Fontaine | 2016-02-22 12:31:51 +0100 |
| commit | 1208e26c74a72d6bdc56751414bb704e47dff99c (patch) | |
| tree | 820d5726054b215e9be540f64295aae78aa49fb2 /Library/Homebrew | |
| parent | 3505509bae834278a1c57d77836c24f4ba509e41 (diff) | |
| download | brew-1208e26c74a72d6bdc56751414bb704e47dff99c.tar.bz2 | |
audit: a couple more tests
Closes Homebrew/homebrew#49404.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/test/test_cmd_audit.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_cmd_audit.rb b/Library/Homebrew/test/test_cmd_audit.rb index ce37a2c8e..d030624ed 100644 --- a/Library/Homebrew/test/test_cmd_audit.rb +++ b/Library/Homebrew/test/test_cmd_audit.rb @@ -321,4 +321,23 @@ class FormulaAuditorTests < Homebrew::TestCase fa.audit_line 'ohai share/"foolibc++"', 3 assert_equal 'Use pkgshare instead of (share/"foolibc++")', fa.problems.shift end + + def test_audit_line_space_in_class_inheritance + fa = formula_auditor "foo", "class Foo<Formula; url '/foo-1.0.tgz'; end" + fa.audit_line "class Foo<Formula", 1 + assert_equal "Use a space in class inheritance: class Foo < Formula", + fa.problems.shift + end + + def test_audit_line_default_template + fa = formula_auditor "foo", "class Foo < Formula; url '/foo-1.0.tgz'; end" + + fa.audit_line '# system "cmake", ".", *std_cmake_args', 3 + assert_equal "Commented cmake call found", + fa.problems.shift + + fa.audit_line "# PLEASE REMOVE", 3 + assert_equal "Please remove default template comments", + fa.problems.shift + end end |
