entr: add test and modernize

Closes Homebrew/homebrew#35780.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Xu Cheng 2015-01-12 21:16:16 +08:00 committed by Mike McQuaid
parent 7e56b0dd4b
commit ead88b36d0

View file

@ -1,9 +1,7 @@
require 'formula'
class Entr < Formula
homepage 'http://entrproject.org/'
url 'http://entrproject.org/code/entr-3.0.tar.gz'
sha1 'e7c5f589b2bce839464052b116a051b4d8f43f23'
homepage "http://entrproject.org/"
url "http://entrproject.org/code/entr-3.0.tar.gz"
sha1 "e7c5f589b2bce839464052b116a051b4d8f43f23"
bottle do
cellar :any
@ -13,10 +11,19 @@ class Entr < Formula
end
def install
ENV['PREFIX'] = prefix
ENV['MANPREFIX'] = man
ENV["PREFIX"] = prefix
ENV["MANPREFIX"] = man
system "./configure"
system "make"
system "make install"
system "make", "install"
end
test do
touch testpath/"test.1"
fork do
sleep 0.5
touch testpath/"test.2"
end
assert_equal "New File", pipe_output("#{bin}/entr -d echo 'New File'", testpath).strip
end
end