homebrew-core/Formula/algol68g.rb
Mike Naberezny a90f10e910 algol68g: improve test by running a short program
Closes Homebrew/homebrew#26442.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-02-06 09:00:22 +00:00

25 lines
567 B
Ruby

require 'formula'
class Algol68g < Formula
homepage 'http://www.xs4all.nl/~jmvdveer/algol.html'
url 'http://jmvdveer.home.xs4all.nl/algol68g-2.8.tar.gz'
sha1 '46b43b8db53e2a8c02e218ca9c81cf5e6ce924fd'
depends_on 'gsl' => :optional
def install
system "./configure", "--prefix=#{prefix}"
system "make install"
end
test do
path = testpath/"hello.alg"
path.write <<-EOS.undent
print("Hello World")
EOS
output = `#{bin}/a68g #{path}`.strip
assert_equal "Hello World", output
assert_equal 0, $?.exitstatus
end
end