| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Test.Tasty.Discover.Internal.Config
Description
The test driver configuration options module.
Anything that can be passed as an argument to the test driver
definition exists as a field in the Config type.
Synopsis
- data Config = Config {
- modules :: Maybe GlobPattern
- moduleSuffix :: Maybe String
- searchDir :: FilePath
- generatedModuleName :: Maybe String
- ignores :: Maybe GlobPattern
- ignoredModules :: [FilePath]
- tastyIngredients :: [Ingredient]
- tastyOptions :: [String]
- inPlace :: Bool
- noModuleSuffix :: Bool
- debug :: Bool
- treeDisplay :: Bool
- noMain :: Bool
- type GlobPattern = String
- newtype SkipTest = SkipTest Bool
- newtype OnPlatform = OnPlatform (String -> Bool)
- checkPlatform :: OnPlatform -> Bool
- onLinux :: OnPlatform
- onDarwin :: OnPlatform
- onWindows :: OnPlatform
- onUnix :: OnPlatform
- parseConfig :: FilePath -> String -> [String] -> Either String Config
- defaultConfig :: FilePath -> Config
Configuration Options
The discovery and runner configuration.
Constructors
| Config | |
Fields
| |
type GlobPattern = String Source #
A glob pattern.
Newtype wrapper for skip test option.
This option type integrates with Tasty's option system to control whether
tests should be skipped. When set to SkipTest True, tests will show as
[SKIPPED] in yellow in the test output and won't actually execute.
Used internally by the skip function and Flavored type to implement
test skipping functionality.
Instances
| Generic SkipTest Source # | |||||
Defined in Test.Tasty.Discover.Internal.Config Associated Types
| |||||
| Show SkipTest Source # | |||||
| Eq SkipTest Source # | |||||
| IsOption SkipTest Source # | |||||
Defined in Test.Tasty.Discover.Internal.Config Methods parseValue :: String -> Maybe SkipTest # optionName :: Tagged SkipTest String # optionHelp :: Tagged SkipTest String # showDefaultValue :: SkipTest -> Maybe String # | |||||
| type Rep SkipTest Source # | |||||
Defined in Test.Tasty.Discover.Internal.Config | |||||
newtype OnPlatform Source #
Newtype wrapper for platform-specific test filtering.
This option type allows tests to be conditionally executed based on platform criteria. The wrapped function takes a platform string and returns whether the test should run on that platform.
Platform values correspond to System.Info.os: - "linux" for Linux systems - "darwin" for macOS - "mingw32" for Windows (GHC compiled) - "unix" matches both "linux" and "darwin"
Example usage: @ -- Only run on Linux onLinux :: OnPlatform onLinux = OnPlatform (== "linux")
- - Run on Unix-like systems
onUnix :: OnPlatform
onUnix = OnPlatform (p -> p
elem["linux", "darwin"]) @
Constructors
| OnPlatform (String -> Bool) |
Instances
| IsOption OnPlatform Source # | |
Defined in Test.Tasty.Discover.Internal.Config Methods parseValue :: String -> Maybe OnPlatform # optionName :: Tagged OnPlatform String # optionHelp :: Tagged OnPlatform String # showDefaultValue :: OnPlatform -> Maybe String # | |
checkPlatform :: OnPlatform -> Bool Source #
Check if the current platform matches the OnPlatform criteria
onLinux :: OnPlatform Source #
Helper function: only run on Linux
onDarwin :: OnPlatform Source #
Helper function: only run on macOS
onWindows :: OnPlatform Source #
Helper function: only run on Windows (mingw32)
onUnix :: OnPlatform Source #
Helper function: only run on Unix-like systems (Linux or macOS)
Configuration Parser
parseConfig :: FilePath -> String -> [String] -> Either String Config Source #
Configuration options parser.
Configuration Defaults
defaultConfig :: FilePath -> Config Source #
The default configuration