Documentation
¶
Overview ¶
Package stubcmd stands in for command-line programs (gh, winget) in tests, alike on every OS: Install copies the test binary under the program's name next to a file of rules, and Main, run first by the test binary's TestMain, makes that copy answer by them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Rule ¶
type Rule struct {
// Args matches the arguments joined by spaces, as sh's case "$*" does:
// '*' matches any run of characters, anything else itself.
Args string
Stdout string
Stderr string
Exit int
// Await, when set, is a file the stub waits for before answering.
Await string
}
Rule is one answer of a stub.