diff options
Diffstat (limited to 'Library')
| -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 |
