module Main where import System.Environment (getArgs, withArgs) import Control.Monad (void) import Test.MuCheck (mucheck) import Test.MuCheck.TestAdapter.HUnit import Test.MuCheck.TestAdapter import Test.MuCheck.Utils.Print main :: IO () main = do val <- getArgs case val of ("-h" : _ ) -> help (fn : file : modulename : args) -> withArgs [] $ mucheck tsFn fn file modulename args _ -> error "Need function file modulename [args]\n\tUse -h to get help" where tsFn :: [MutantFilename] -> [InterpreterOutput HUnitSummary] -> Summary tsFn = testSummary help :: IO () help = putStrLn $ "mucheck function file modulename [args]\n" ++ showAS ["E.g:", " mucheck-hunit qsort Examples/HUnitTest.hs Examples.HUnitTest 'runTestTT tests'", ""]