STDLIB Testing Generic Function Reference
Index
_testing.error
Logs an error message.
STDLIB_TESTING_THEME_ERROR string global: The colour to use for the message (default=”LIGHT_RED”).
Arguments
… (array): The error messages to log.
Exit codes
0: If the error message was logged.
Output on stderr
The error message if the operation fails.
_testing.error_pipe
A pipeable version _testing.error that can read from stdin and return specific error codes when errors are found.
STDLIB_TESTING_THEME_ERROR string global: The colour to use for the message (default=”LIGHT_RED”).
Arguments
$1 (integer): (optional, default=1) The error code that should be returned if any error message is piped to this function.
Exit codes
0: If the error message was not logged.
1: If an error message is logged. (This value is configurable via arguments).
Output on stderr
The error message if the operation fails.
_testing.load
Loads a module with error support.
STDLIB_TESTING_THEME_LOAD string global: The colour to use for the message (default=”GREY”).
Arguments
$1 (string): The module path to source.
Exit codes
0: If the module was loaded.
126: If an invalid argument has been provided.
127: If the wrong number of arguments were provided.
Output on stdout
The notification message.
Output on stderr
The error message if the operation fails.