gnu-prolog: add test

Closes Homebrew/homebrew#35325.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Xu Cheng 2014-12-29 09:06:41 +08:00 committed by Jack Nagel
parent 3bfe41e88f
commit 8636476b5b

View file

@ -1,9 +1,7 @@
require 'formula'
class GnuProlog < Formula
homepage 'http://www.gprolog.org/'
url 'http://gprolog.univ-paris1.fr/gprolog-1.4.4.tar.gz'
sha1 '658b0efa5d916510dcddbbd980d90bc4d43a6e58'
homepage "http://www.gprolog.org/"
url "http://gprolog.univ-paris1.fr/gprolog-1.4.4.tar.gz"
sha1 "658b0efa5d916510dcddbbd980d90bc4d43a6e58"
bottle do
sha1 "8dc1b5782b6fb5e89c62fe3f5b07a908ddff6850" => :yosemite
@ -19,11 +17,20 @@ class GnuProlog < Formula
end
def install
cd 'src' do
cd "src" do
system "./configure", "--prefix=#{prefix}", "--with-doc-dir=#{doc}"
ENV.deparallelize
system "make"
system "make", "install"
end
end
test do
(testpath/"test.pl").write <<-EOS.undent
:- initialization(main).
main :- write('Hello World!'), nl, halt.
EOS
system "#{bin}/gplc", "test.pl"
assert_match /Hello World!/, shell_output("./test")
end
end