Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- defaultTerminalUIFormatter :: TerminalUIFormatter
- terminalUIVisibilityThreshold :: TerminalUIFormatter -> Int
- terminalUIShowRunTimes :: TerminalUIFormatter -> Bool
- terminalUIShowVisibilityThresholds :: TerminalUIFormatter -> Bool
- terminalUILogLevel :: TerminalUIFormatter -> Maybe LogLevel
- terminalUIInitialFolding :: TerminalUIFormatter -> InitialFolding
- terminalUIDefaultEditor :: TerminalUIFormatter -> Maybe String
- terminalUIOpenInEditor :: TerminalUIFormatter -> Maybe String -> (Text -> IO ()) -> SrcLoc -> IO ()
- terminalUICustomExceptionFormatters :: TerminalUIFormatter -> CustomExceptionFormatters
- data InitialFolding
- data CustomTUIException
- = CustomTUIExceptionMessageAndCallStack Text (Maybe CallStack)
- | CustomTUIExceptionBrick (forall n. Widget n)
- isTuiFormatterSupported :: IO Bool
Documentation
The terminal UI formatter produces an interactive UI for running tests and inspecting their results.
defaultTerminalUIFormatter :: TerminalUIFormatter Source #
Default settings for the terminal UI formatter.
Options
terminalUIVisibilityThreshold :: TerminalUIFormatter -> Int Source #
The initial visibility threshold to use when the formatter starts.
terminalUIShowRunTimes :: TerminalUIFormatter -> Bool Source #
Whether to show or hide run times.
terminalUIShowVisibilityThresholds :: TerminalUIFormatter -> Bool Source #
Whether to show or hide visibility thresholds next to nodes.
terminalUILogLevel :: TerminalUIFormatter -> Maybe LogLevel Source #
Log level for test log displays.
terminalUIInitialFolding :: TerminalUIFormatter -> InitialFolding Source #
The initial folding settings to use when the formatter starts.
terminalUIDefaultEditor :: TerminalUIFormatter -> Maybe String Source #
Default value to use for the EDITOR environment variable when one is not provided.
If Nothing
and EDITOR can't be found, edit commands will do nothing.
Here are some recommended values, depending on your preferred editor:
- Emacs:
export EDITOR="emacsclient --eval '(progn (find-file FILE) (goto-line LINE) (forward-char (- COLUMN 1)) (recenter))'"
- Terminal Emacs:
export EDITOR="emacsclient -nw --eval '(progn (find-file FILE) (goto-line LINE) (forward-char (- COLUMN 1)) (recenter))'"
- Vim:
export EDITOR="vim +LINE"
terminalUIOpenInEditor :: TerminalUIFormatter -> Maybe String -> (Text -> IO ()) -> SrcLoc -> IO () Source #
Callback to open a source location in your editor. By default, finds the command in the EDITOR environment variable
and invokes it with the strings LINE, COLUMN, and FILE replaced with the line number, column, and file path.
If FILE is not found in the string, it will be appended to the command after a space.
It's also passed a debug callback that accepts a Text
; messages logged with this function will go into the formatter logs.
terminalUICustomExceptionFormatters :: TerminalUIFormatter -> CustomExceptionFormatters Source #
Custom exception formatters, used to nicely format custom exception types.
Auxiliary types
data InitialFolding Source #
Instances
Show InitialFolding Source # | |
Defined in Test.Sandwich.Formatters.TerminalUI.Types showsPrec :: Int -> InitialFolding -> ShowS # show :: InitialFolding -> String # showList :: [InitialFolding] -> ShowS # | |
Eq InitialFolding Source # | |
Defined in Test.Sandwich.Formatters.TerminalUI.Types (==) :: InitialFolding -> InitialFolding -> Bool # (/=) :: InitialFolding -> InitialFolding -> Bool # |
data CustomTUIException Source #
CustomTUIExceptionMessageAndCallStack Text (Maybe CallStack) | |
CustomTUIExceptionBrick (forall n. Widget n) |