Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileInTempDir ¶
CompileInTempDir creates a temp directory and compiles the main package of the current directory. Remember to delete the directory after the test:
defer os.RemoveAll(tmpDir)
The first argument of the environment variable EXECPATH overrides execPath.
Types ¶
type FakeStdin ¶
type FakeStdin struct {
// contains filtered or unexported fields
}
FakeStdin implements io.Reader and returns predefined list of answers, suitable for mocking standard input.
func NewFakeStdin ¶
NewFakeStdin creates new FakeStdin value with given answers.
func (*FakeStdin) Count ¶
Count returns how many answers have been read.
This counter overflows and never returns value bigger than the count of given answers.
func (*FakeStdin) Overflowed ¶
Overflowed reports whether more reads happened than expected.
Click to show internal directories.
Click to hide internal directories.