testhelper

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL