Commit 9a332e30 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add another ghc -e / runghc test

parent a3440b7f
......@@ -14,3 +14,7 @@ ghc-e003:
ghc-e004:
$(TEST_HC) -ignore-dot-ghci -e ":m + System.Exit" -e "exitWith (ExitFailure 6)"; echo $$?
# This is what runghc does:
ghc-e005:
$(TEST_HC) -ignore-dot-ghci -main-is foo ghc-e005.hs -e ":set prog ghc-e005-prog" -e ":main [\"the\",\"args\"]"; echo $$?
......@@ -3,4 +3,5 @@ test('ghc-e001', normal, run_command, ['$MAKE --no-print-directory -s ghc-e001']
test('ghc-e002', normal, run_command, ['$MAKE --no-print-directory -s ghc-e002'])
test('ghc-e003', normal, run_command, ['$MAKE --no-print-directory -s ghc-e003'])
test('ghc-e004', normal, run_command, ['$MAKE --no-print-directory -s ghc-e004'])
test('ghc-e005', normal, run_command, ['$MAKE --no-print-directory -s ghc-e005'])
import System.Environment
import System.IO
main :: IO ()
main = error "main got called"
foo :: IO ()
foo = do putStrLn "This is foo"
getArgs >>= print
hFlush stdout
error "foo"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment