forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiff-so-fancy.rb
31 lines (27 loc) · 912 Bytes
/
diff-so-fancy.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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.6.tar.gz"
sha256 "089e4d887a1715d58e7151f372518258878f11f55bd534916009adf6ae443737"
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