From b2d129fb94824da8f6ee1b562a13a8ef4f5f535e Mon Sep 17 00:00:00 2001 From: Ted Pennings Date: Wed, 5 Mar 2014 23:39:25 -0500 Subject: ghc: add a test Closes #27248. Signed-off-by: Adam Vandenberg --- Library/Formula/ghc.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Formula') 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__ -- cgit v1.2.3