test-framework-0.8.1.1: Framework for running and organising tests, with HUnit and QuickCheck support

Safe Haskell | None
Language | Haskell98

Test.Framework.Runners.Console

Synopsis

- defaultMain :: [Test] -> IO ()
- defaultMainWithArgs :: [Test] -> [String] -> IO ()
- defaultMainWithOpts :: [Test] -> RunnerOptions -> IO ()
- type SuppliedRunnerOptions = Maybe RunnerOptions
- optionsDescription :: [OptDescr SuppliedRunnerOptions]
- interpretArgs :: [String] -> IO (Either String (RunnerOptions, [String]))
- interpretArgsOrExit :: [String] -> IO RunnerOptions

# Documentation

defaultMain :: [Test] -> IO () #

defaultMainWithArgs :: [Test] -> [String] -> IO () #

A version of `defaultMain` that lets you ignore the command line arguments in favour of another list of `String`s.

defaultMainWithOpts :: [Test] -> RunnerOptions -> IO () #

A version of `defaultMain` that lets you ignore the command line arguments in favour of an explicit set of `RunnerOptions`.

type SuppliedRunnerOptions = Maybe RunnerOptions #

`Nothing` signifies that usage information should be displayed. `Just` simply gives us the contribution to overall options by the command line option.

optionsDescription :: [OptDescr SuppliedRunnerOptions] #

Options understood by test-framework. This can be used to add more options to the tester executable.

interpretArgs :: [String] -> IO (Either String (RunnerOptions, [String])) #

Parse the specified command line arguments into a `RunnerOptions` and some remaining arguments, or return a reason as to why we can't.

interpretArgsOrExit :: [String] -> IO RunnerOptions #

A version of `interpretArgs` that ends the process if it fails.