34 lines
821 B
Ruby
34 lines
821 B
Ruby
|
class Delta < Formula
|
||
|
homepage "http://delta.tigris.org/"
|
||
|
url "https://mirrors.kernel.org/debian/pool/main/d/delta/delta_2006.08.03.orig.tar.gz"
|
||
|
sha256 "38184847a92b01b099bf927dbe66ef88fcfbe7d346a7304eeaad0977cb809ca0"
|
||
|
|
||
|
def install
|
||
|
system "make"
|
||
|
bin.install "delta", "multidelta", "topformflat"
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
(testpath/"test1.c").write <<-EOS.undent
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main() {
|
||
|
int i = -1;
|
||
|
unsigned int j = i;
|
||
|
printf("%d\n", j);
|
||
|
}
|
||
|
|
||
|
EOS
|
||
|
(testpath/"test1.sh").write <<-EOS.undent
|
||
|
#!/usr/bin/env bash
|
||
|
|
||
|
clang -Weverything "$(dirname "${BASH_SOURCE[0]}")"/test1.c 2>&1 | \
|
||
|
grep 'implicit conversion changes signedness'
|
||
|
|
||
|
EOS
|
||
|
|
||
|
chmod 0755, testpath/"test1.sh"
|
||
|
system "#{bin}/delta", "-test=test1.sh", "test1.c"
|
||
|
end
|
||
|
end
|