aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorTed Pennings2014-03-05 23:39:25 -0500
committerAdam Vandenberg2014-03-06 21:09:00 -0800
commitb2d129fb94824da8f6ee1b562a13a8ef4f5f535e (patch)
tree6d1ecbc067823816a3eeab842b68154819c854d6 /Library/Formula
parent7bb1d40168de079e0b3f03ffc4977cab7392b40a (diff)
downloadhomebrew-b2d129fb94824da8f6ee1b562a13a8ef4f5f535e.tar.bz2
ghc: add a test
Closes #27248. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/ghc.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/ghc.rb b/Library/Formula/ghc.rb
index 27a67250b..6dc282c82 100644
--- a/Library/Formula/ghc.rb
+++ b/Library/Formula/ghc.rb
@@ -129,6 +129,14 @@ class Ghc < Formula
This brew is for GHC only; you might also be interested in haskell-platform.
EOS
end
+
+ test do
+ hello = (testpath/"hello.hs")
+ hello.write('main = putStrLn "Hello Homebrew"')
+ output = `echo "main" | '#{bin}/ghci' #{hello}`
+ assert $?.success?
+ assert_match /Hello Homebrew/i, output
+ end
end
__END__