2013-06-06 23:37:18 +00:00
|
|
|
class Cloc < Formula
|
2015-02-04 12:54:49 +00:00
|
|
|
homepage "http://cloc.sourceforge.net/"
|
|
|
|
url "https://downloads.sourceforge.net/project/cloc/cloc/v1.62/cloc-1.62.pl"
|
|
|
|
sha1 "78f6123c967f9b142f77cba48decd11d56ab6c38"
|
2011-03-13 01:10:35 +00:00
|
|
|
|
|
|
|
def install
|
2013-03-30 19:19:30 +00:00
|
|
|
bin.install "cloc-#{version}.pl" => "cloc"
|
2011-03-13 01:10:35 +00:00
|
|
|
end
|
2015-02-04 12:54:49 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
|
|
|
|
assert_match "1,C,0,0,4", shell_output("#{bin}/cloc --csv .")
|
|
|
|
end
|
2010-01-14 01:48:32 +00:00
|
|
|
end
|