diff options
| author | Xu Cheng | 2015-03-10 21:14:14 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-03-11 00:50:19 +0800 |
| commit | 256acf95164d6af5affa368bda97fe0aedcc1c47 (patch) | |
| tree | 28474b78ac160046018833816d244ba071c77688 /Library | |
| parent | b6d752a9f42746164bce4fdaf1f041a649b3a4a4 (diff) | |
| download | homebrew-256acf95164d6af5affa368bda97fe0aedcc1c47.tar.bz2 | |
mmv: add test
Closes #37563.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mmv.rb | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/Library/Formula/mmv.rb b/Library/Formula/mmv.rb index 05107ff3c..3b70a3698 100644 --- a/Library/Formula/mmv.rb +++ b/Library/Formula/mmv.rb @@ -1,25 +1,31 @@ -require 'formula' - class Mmv < Formula - homepage 'http://packages.debian.org/unstable/utils/mmv' - url "http://mirrors.kernel.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz" - mirror 'http://ftp.us.debian.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz' - sha1 '538a26b1d7e8b9bc286843e6aa2d8d959d8914bb' + homepage "https://packages.debian.org/unstable/utils/mmv" + url "https://mirrors.kernel.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz" + mirror "http://ftp.us.debian.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz" + sha256 "0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef" patch do url "http://ftp.us.debian.org/debian/pool/main/m/mmv/mmv_1.01b-15.diff.gz" - sha1 "101f42c641472c7fc1f2c2f7ef391c032cdbe3c0" + sha256 "9ad3e3d47510f816b4a18bae04ea75913588eec92248182f85dd09bc5ad2df13" end def install system "make", "CC=#{ENV.cc}", "LDFLAGS=" - bin.install 'mmv' - man1.install 'mmv.1' + bin.install "mmv" + man1.install "mmv.1" %w[mcp mad mln].each do |mxx| bin.install_symlink "mmv" => mxx man1.install_symlink "mmv.1" => "#{mxx}.1" end end + + test do + touch testpath/"a" + touch testpath/"b" + pipe_output(bin/"mmv", "a b\nb c\n") + assert !(testpath/"a").exist? + assert (testpath/"c").exist? + end end |
