Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command builds an exec.Cmd that will run the given function as an external executable.
This operates by re-running the test executable to run only the current test, and hijacking that test execution to run the main function.
cmd := Command(t, func() { fmt.Println("hello") }) got, err := cmd.Output() ... fmt.Println(string(got) == "hello\n") // true
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.