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

Safe Haskell | None
Language | Haskell2010

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 () Source #

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

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

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

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

type SuppliedRunnerOptions = Maybe RunnerOptions Source #

`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] Source #

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

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

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 Source #

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