diff options
| author | Baptiste Fontaine | 2015-03-18 20:18:33 +0100 |
|---|---|---|
| committer | Brett Koonce | 2015-03-18 22:39:10 -0700 |
| commit | dfc746637cf87a7f04ca92e2f8b70afa33f8d7ec (patch) | |
| tree | 5a5c78eb13e9a8cece7e442f4bf8849b0eaa51ed | |
| parent | 283cf0b2f4f6bfaa5623f10ea05b307656039699 (diff) | |
| download | homebrew-dfc746637cf87a7f04ca92e2f8b70afa33f8d7ec.tar.bz2 | |
timelimit: add test
Closes #37840.
Signed-off-by: Brett Koonce <koonce@gmail.com>
| -rw-r--r-- | Library/Formula/timelimit.rb | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/Library/Formula/timelimit.rb b/Library/Formula/timelimit.rb index cd975a711..f3f4dd9df 100644 --- a/Library/Formula/timelimit.rb +++ b/Library/Formula/timelimit.rb @@ -1,15 +1,24 @@ -require 'formula' - class Timelimit < Formula - homepage 'http://devel.ringlet.net/sysutils/timelimit/' - url 'http://devel.ringlet.net/sysutils/timelimit/timelimit-1.8.tar.gz' - sha1 '0bc20606db0f587f3927f747680c9522b2d4c5af' + homepage "http://devel.ringlet.net/sysutils/timelimit/" + url "http://devel.ringlet.net/sysutils/timelimit/timelimit-1.8.tar.gz" + sha256 "026e72b345f8407ebaa002036fd785b2136b2dfc4f8854f14536196ee3079996" def install - system "make", "LOCALBASE=#{prefix}", - "MANDIR=#{man}/man", - "all" - bin.install "timelimit" - man1.install "timelimit.1.gz" + # don't install for a specific user + inreplace "Makefile", "-o ${BINOWN} -g ${BINGRP}", "" + inreplace "Makefile", "-o ${MANOWN} -g ${MANGRP}", "" + + args = %W[LOCALBASE=#{prefix} MANDIR=#{man}/man] + + check_args = args + ["check"] + install_args = args + ["install"] + + system "make", *check_args + system "make", *install_args + end + + test do + assert_equal "timelimit: sending warning signal 15", + shell_output("#{bin}/timelimit -p -t 1 sleep 5 2>&1", 143).chomp end end |
