@@ -24,15 +24,14 @@ import System.Exit
2424import System.FilePath.Posix
2525import Test.HUnit -- only import needed, others are optional
2626
27-
2827testcaseDir :: FilePath
2928testcaseDir = " test/testcase"
3029
3130testcaseOutputDir :: FilePath
3231testcaseOutputDir = " ../testcase-output"
3332
3433testSourceFile :: String -> FilePath
35- testSourceFile testName = testcaseDir </> testName </> " source.hs"
34+ testSourceFile testName = testcaseDir </> testName </> " source.hs"
3635
3736testErrorFile :: String -> FilePath
3837testErrorFile testName = testcaseOutputDir </> testName </> " error.txt"
@@ -49,9 +48,10 @@ savedErrorOutput testName = do
4948 return savedErrMsg
5049
5150compileErrorOutput :: String -> IO String
52- compileErrorOutput testName = do
51+ compileErrorOutput testName = do
5352 createDir <- createDirectoryIfMissing True (testcaseOutputDir </> testName)
54- out <- compileSource
53+ out <- compileSource
54+ FullBuild
5555 (testSourceFile testName)
5656 (testOutputFile testName)
5757 (testErrorFile testName)
@@ -60,8 +60,8 @@ compileErrorOutput testName = do
6060 return errMsg
6161
6262genTestCases :: [String ] -> [Test ]
63- genTestCases [] = [" Empty directory testcase" ~: " FOo" ~=? (map toUpper " foo" )]
64- genTestCases (x) = map toTestCase x
63+ genTestCases [] = [" Empty directory testcase" ~: " FOo" ~=? (map toUpper " foo" )]
64+ genTestCases (x) = map toTestCase x
6565
6666toTestCase x = x ~: do
6767 err1 <- compileErrorOutput x
@@ -80,6 +80,6 @@ main :: IO Counts
8080main = do
8181 cs@ (Counts _ _ errs fails) <- getTestCases testcaseDir
8282 putStrLn (showCounts cs)
83- if (errs > 0 || fails > 0 )
83+ if (errs > 0 || fails > 0 )
8484 then exitFailure
85- else exitSuccess
85+ else exitSuccess
0 commit comments