# Functions
ExpectEmptyInput errors if the result from the pipeline was not empty
Non-empty in this context means that the output contains characters that are non-whitespace, i.e.
ExpectNonEmptyInput errors if the result from the pipeline was empty
Non-empty in this context means that the output contains characters that are non-whitespace, i.e.
Grep returns a checker that performs a regexp match on the command's output and returns an error if it failed
Note: by default both streams will be checked by the grep.
IntCompare reads the input from the pipeline and compares it to a value using `op`
If the input is not an int, this fails.
LineCount counts the number of lines received
This excludes empty lines.
LineCountCheck builds a pipe checker to count the number of lines on stdout by default
To change the stream(s) on which to perform the check, you can call SetStream on the returned pipe checker.
MkPipeCheck builds a new named PipeChecker
Before it can be used, it will need a tester to be set, but this function is meant to make initialisation simpler.
PipeGrep performs a grep on an input and returns the matches, one-per-line.
PluginsUsed is a glorified `Grep` checker that looks for a bunch of plugins used from the logs of a packer build or packer validate.
Tee pipes the output to stdout (as t.Logf) and forwards it, unaltered
This is useful typically for troubleshooting a pipe that misbehaves.
# Constants
BothStreams will use both stdout and stderr for performing a check.
Invert the check, i.e.
Only grep stderr.
Only grep stdout.
OnlySterr will only use stderr for performing a check.
OnlyStdout will only use stdout for performing a check.
# Structs
CustomCheck is meant to be a one-off checker with a user-provided function.
PipeChecker is a kind of checker that essentially lets users write mini gadgets that pipe inputs together, and compose those to end as a true/false statement, which translates to an error.
# Interfaces
Checker represents anything that can be used in conjunction with Assert.
Pipe is any command that allows piping two gadgets together
There's always only one input and one output (stdout), mimicking essentially how pipes work in the UNIX-world.
Tester is the end of a pipe for testing purposes.
# Type aliases
CustomPipe allows providing a simple function for piping inputs together.
CustomTester allows providing a function to check that the input is what we want.