test

package
v0.0.0-weekly-f4-test-... Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapturedOutput

type CapturedOutput struct {
	// contains filtered or unexported fields
}

func CaptureOutput

func CaptureOutput(t *testing.T) *CapturedOutput

CaptureOutput replaces os.Stdout and os.Stderr with new pipes, that will write output to buffers. Buffers are accessible by calling Done on returned struct.

os.Stdout and os.Stderr must be reverted to previous values manually.

func (*CapturedOutput) Done

func (co *CapturedOutput) Done() (stdout string, stderr string)

Done waits until all captured output has been written to buffers, and then returns the buffers.

Jump to

Keyboard shortcuts

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