/
v.rb
34 lines (30 loc) 路 1.83 KB
/
v.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
32
33
34
class V < Formula
desc "Z for vim"
homepage "https://github.com/rupa/v"
url "https://github.com/rupa/v/archive/refs/tags/v1.1.tar.gz"
sha256 "6483ef1248dcbc6f360b0cdeb9f9c11879815bd18b0c4f053a18ddd56a69b81f"
revision 1
head "https://github.com/rupa/v.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_sonoma: "964e9564884fc6fd21c705d73966a4b64f7b19c7d568e894006cb45f8b1565ff"
sha256 cellar: :any_skip_relocation, arm64_ventura: "f49df5380a45622ece889c919db67c7255d32e762452f0fa9788cd31c1748f68"
sha256 cellar: :any_skip_relocation, arm64_monterey: "f49df5380a45622ece889c919db67c7255d32e762452f0fa9788cd31c1748f68"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "f49df5380a45622ece889c919db67c7255d32e762452f0fa9788cd31c1748f68"
sha256 cellar: :any_skip_relocation, sonoma: "24b7fab6af49ca016ca90f7e5f0dd47258d182d226104e36f2bfe7ca5092fd9c"
sha256 cellar: :any_skip_relocation, ventura: "18192fa0168a1a7750f041306e4b308bd0dc36373c8dc8faac7e54e94cfbdd81"
sha256 cellar: :any_skip_relocation, monterey: "18192fa0168a1a7750f041306e4b308bd0dc36373c8dc8faac7e54e94cfbdd81"
sha256 cellar: :any_skip_relocation, big_sur: "18192fa0168a1a7750f041306e4b308bd0dc36373c8dc8faac7e54e94cfbdd81"
sha256 cellar: :any_skip_relocation, catalina: "18192fa0168a1a7750f041306e4b308bd0dc36373c8dc8faac7e54e94cfbdd81"
sha256 cellar: :any_skip_relocation, x86_64_linux: "f49df5380a45622ece889c919db67c7255d32e762452f0fa9788cd31c1748f68"
end
uses_from_macos "vim"
def install
bin.install "v"
man1.install "v.1"
end
test do
(testpath/".vimrc").write "set viminfo='25,\"50,n#{testpath}/.viminfo"
system "vim", "-u", testpath/".vimrc", "+wq", "test.txt"
assert_equal "#{testpath}/test.txt", shell_output("#{bin}/v -a --debug").chomp
end
end