aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike Naberezny2014-02-05 12:31:07 -0800
committerMike McQuaid2014-02-06 09:00:22 +0000
commitfeba32df7994579ae74ad9e363681d4efae78de9 (patch)
tree106bd8920a34511bb45af6359a12b348882e25fb /Library
parentd96852229de85b65179439595314bc84ea9a717a (diff)
downloadhomebrew-feba32df7994579ae74ad9e363681d4efae78de9.tar.bz2
algol68g: improve test by running a short program
Closes #26442. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/algol68g.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/Library/Formula/algol68g.rb b/Library/Formula/algol68g.rb
index 191b7f44b..7706fb785 100644
--- a/Library/Formula/algol68g.rb
+++ b/Library/Formula/algol68g.rb
@@ -12,7 +12,14 @@ class Algol68g < Formula
system "make install"
end
- def test
- system "#{bin}/a68g", "--help"
+ 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