homebrew-core/Formula/diff-so-fancy.rb
Igor Kapkov f1121c3975 diff-so-fancy 1.2.7
Closes #44260.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2019-09-14 10:31:51 +02: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.7.tar.gz"
sha256 "2dc6dcd45135d5b0830aace9dddeeba7eb25b6969b5137f4662012d8a0438c81"
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