aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/v.rb
blob: 48e30d0f0c93573063b17d8f5e7676d20038a0bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class V < Formula
  homepage "https://github.com/rupa/v"
  head "https://github.com/rupa/v.git"
  url "https://github.com/rupa/v/archive/v1.0.tar.gz"
  sha256 "fc25860c29a2d02908f4c2b6ecf0499e0121393a0ec13ec1c047f7a6ead100f1"

  def install
    bin.install "v"
    man1.install "v.1"
  end

  test do
    (testpath/".vimrc").write "set viminfo='25,\"50,n#{testpath}/.viminfo"
    system "/usr/bin/vim", "-u", testpath/".vimrc", "+wq", "test.txt"
    assert_equal "#{testpath}/test.txt", shell_output("#{bin}/v -a --debug").chomp
  end
end