ghc: add a test

Closes Homebrew/homebrew#27248.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Ted Pennings 2014-03-05 23:39:25 -05:00 committed by Adam Vandenberg
parent 60a7aa0aa6
commit e333888c43
1 changed files with 8 additions and 0 deletions

View File

@ -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__