testecho

command
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Command testecho assists test cases which assert the subject handles process execution as expected. Its flags allow selection of stdout, stderr, exit code, etc.

Usage:

testecho --help

Print "out" to standard output:

testecho --stdout out

Same as above but also print "err" to standard error:

testecho --stdout out --stderr err

Same as above but also exit with code 7 instead of 0:

testecho --stdout out --stderr err --code 7

Same as above but also sleep for 5 seconds after printing:

testecho --stdout out --stderr err --code 7 --sleep 5

Spawn another testecho proecss, print its PID, and then sleep "forever" (10000 seconds):

testecho --spawn

Same as above but also print "err" to standard error:

testecho --spawn --stderr err

Print standard input:

echo "out" | testecho

Same as above but also print "err" to standard error:

echo "out" | testecho --stderr err

Same as above but also exit with code 7 instead of 0:

echo "out" | testecho --stderr err --code 7

Same as above but also sleep for 5 seconds after printing

echo "out" | testecho --stderr err --code 7 --sleep 5

Jump to

Keyboard shortcuts

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