git-url-sub: head & test added
Closes Homebrew/homebrew#39656. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
dbb9d417d8
commit
5c14130908
1 changed files with 12 additions and 5 deletions
|
@ -1,11 +1,18 @@
|
|||
require 'formula'
|
||||
|
||||
class GitUrlSub < Formula
|
||||
homepage 'http://gosuri.github.io/git-url-sub'
|
||||
url 'https://github.com/gosuri/git-url-sub/archive/1.0.1.tar.gz'
|
||||
sha1 '294631d898a4263285f7a2ac0ce93ff494dadbf8'
|
||||
homepage "https://gosuri.github.io/git-url-sub"
|
||||
url "https://github.com/gosuri/git-url-sub/archive/1.0.1.tar.gz"
|
||||
sha256 "6c943b55087e786e680d360cb9e085d8f1d7b9233c88e8f2e6a36f8e598a00a9"
|
||||
|
||||
head "https://github.com/gosuri/git-url-sub.git"
|
||||
|
||||
def install
|
||||
system "make", "install", "PREFIX=#{prefix}"
|
||||
end
|
||||
|
||||
test do
|
||||
system "git", "init"
|
||||
system "git", "remote", "add", "origin", "foo"
|
||||
system "#{bin}/git-url-sub", "-c", "foo", "bar"
|
||||
assert_match(/origin\s+bar \(fetch\)/, shell_output("git remote -v"))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue