homebrew-core/Formula/diff-so-fancy.rb
2019-01-26 14:45:02 -05:00

31 lines
912 B
Ruby

class DiffSoFancy < Formula
desc "Good-lookin' diffs with diff-highlight and more"
homepage "https://github.com/so-fancy/diff-so-fancy"
url "https://github.com/so-fancy/diff-so-fancy/archive/v1.2.5.tar.gz"
sha256 "4c13e59ef95b1e4a69f840d80e97d5bc4756add743b5a4cf50dadaa071eb088e"
head "https://github.com/so-fancy/diff-so-fancy.git", :branch => "next"
bottle :unneeded
def install
libexec.install "diff-so-fancy", "lib"
bin.install_symlink libexec/"diff-so-fancy"
end
test do
diff = <<~EOS
diff --git a/hello.c b/hello.c
index 8c15c31..0a9c78f 100644
--- a/hello.c
+++ b/hello.c
@@ -1,5 +1,5 @@
#include <stdio.h>
int main(int argc, char **argv) {
- printf("Hello, world!\n");
+ printf("Hello, Homebrew!\n");
}
EOS
assert_match "modified: hello.c", pipe_output(bin/"diff-so-fancy", diff, 0)
end
end