Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module exports the basic ingredients defined in the tasty
packages.
Note that if defaultIngredients
from Test.Tasty suits your needs,
use that instead of importing this module.
Synopsis
- consoleTestReporter :: Ingredient
- newtype Quiet = Quiet Bool
- newtype HideSuccesses = HideSuccesses Bool
- newtype AnsiTricks = AnsiTricks {}
- listingTests :: Ingredient
- newtype ListTests = ListTests Bool
- testsNames :: OptionSet -> TestTree -> [TestName]
- includingOptions :: [OptionDescription] -> Ingredient
Console test reporter
consoleTestReporter :: Ingredient Source #
A simple console UI
Do not print test results (see README for details)
Instances
Eq Quiet Source # | |
Ord Quiet Source # | |
IsOption Quiet Source # | |
Defined in Test.Tasty.Ingredients.ConsoleReporter defaultValue :: Quiet Source # parseValue :: String -> Maybe Quiet Source # optionName :: Tagged Quiet String Source # optionHelp :: Tagged Quiet String Source # showDefaultValue :: Quiet -> Maybe String Source # optionCLParser :: Parser Quiet Source # |
newtype HideSuccesses Source #
Report only failed tests.
At the moment, this option only works globally. As an argument to localOption
, it does nothing.
Instances
Eq HideSuccesses Source # | |
Defined in Test.Tasty.Ingredients.ConsoleReporter (==) :: HideSuccesses -> HideSuccesses -> Bool # (/=) :: HideSuccesses -> HideSuccesses -> Bool # | |
Ord HideSuccesses Source # | |
Defined in Test.Tasty.Ingredients.ConsoleReporter compare :: HideSuccesses -> HideSuccesses -> Ordering # (<) :: HideSuccesses -> HideSuccesses -> Bool # (<=) :: HideSuccesses -> HideSuccesses -> Bool # (>) :: HideSuccesses -> HideSuccesses -> Bool # (>=) :: HideSuccesses -> HideSuccesses -> Bool # max :: HideSuccesses -> HideSuccesses -> HideSuccesses # min :: HideSuccesses -> HideSuccesses -> HideSuccesses # | |
IsOption HideSuccesses Source # | |
Defined in Test.Tasty.Ingredients.ConsoleReporter defaultValue :: HideSuccesses Source # parseValue :: String -> Maybe HideSuccesses Source # optionName :: Tagged HideSuccesses String Source # optionHelp :: Tagged HideSuccesses String Source # showDefaultValue :: HideSuccesses -> Maybe String Source # optionCLParser :: Parser HideSuccesses Source # |
newtype AnsiTricks Source #
By default, when the option --hide-successes
is given and the output
goes to an ANSI-capable terminal, we employ some ANSI terminal tricks to
display the name of the currently running test and then erase it if it
succeeds.
These tricks sometimes fail, however—in particular, when the test names happen to be longer than the width of the terminal window. See
- https://github.com/UnkindPartition/tasty/issues/152
- https://github.com/UnkindPartition/tasty/issues/250
When that happens, this option can be used to disable the tricks. In that case, the test name will be printed only once the test fails.
Instances
IsOption AnsiTricks Source # | |
Defined in Test.Tasty.Ingredients.ConsoleReporter defaultValue :: AnsiTricks Source # parseValue :: String -> Maybe AnsiTricks Source # optionName :: Tagged AnsiTricks String Source # optionHelp :: Tagged AnsiTricks String Source # showDefaultValue :: AnsiTricks -> Maybe String Source # optionCLParser :: Parser AnsiTricks Source # |
Listing tests
listingTests :: Ingredient Source #
The ingredient that provides the test listing functionality
This option, when set to True
, specifies that we should run in the
«list tests» mode
Instances
Eq ListTests Source # | |
Ord ListTests Source # | |
Defined in Test.Tasty.Ingredients.ListTests | |
IsOption ListTests Source # | |
Defined in Test.Tasty.Ingredients.ListTests defaultValue :: ListTests Source # parseValue :: String -> Maybe ListTests Source # optionName :: Tagged ListTests String Source # optionHelp :: Tagged ListTests String Source # showDefaultValue :: ListTests -> Maybe String Source # optionCLParser :: Parser ListTests Source # |
Adding options
includingOptions :: [OptionDescription] -> Ingredient Source #
This ingredient doesn't do anything apart from registering additional options.
The option values can be accessed using askOption
.