Documentation
¶
Overview ¶
testhelper is a cross-platform helper binary used in execreceiver tests. It replaces shell-specific commands (sh, sleep, seq, printf, etc.) so that tests run identically on Linux, macOS, and Windows.
Usage: testhelper <subcommand> [args...]
echo <text...> print args joined by space to stdout, exit 0
echo-stderr <text...> print args joined by space to stderr, exit 0
echo-both <stdout> <stderr> print first arg to stdout, second to stderr, exit 0
echo-exit <text> <code> print text to stdout, exit with code
exit <code> exit with the given code, no output
sleep <ms> sleep for N milliseconds, exit 0
seq <n> print "line1" through "lineN" to stdout, exit 0
multiline <a> <b> ... print each arg on its own line, exit 0
env <VAR> print the value of the named env var (or empty), exit 0
pwd print the working directory, exit 0
statefile <path> state-machine: reads/writes an integer counter in <path>
to produce deterministic output across 4 invocations
Click to show internal directories.
Click to hide internal directories.