runner

module
v0.0.0-...-0a34fb1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: BSD-3-Clause

README

runner

runner is a package that enables testing of functions that use the os/exec.Command() method for running commands.

By default, runner.New() returns an initialized os/exec.Command(). This contains the .Run() method that is defined in the Runner interface.

In your tests, you can create a interface with the .Run() method and have it return errors for negative testing, return nil for positive testing, and even have it panic to see how your program acts when unrecoverable errors are hit.

Example

See the following files from the devsupport project.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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