Versions in this module Expand all Collapse all v0 v0.1.0 Mar 18, 2026 Changes in this version + type TestCmd struct + Cmd *exec.Cmd + Factory *TestCmdFactory + FileListeners map[string]opctx.LineListener + StderrListener opctx.LineListener + StdoutListener opctx.LineListener + func (c *TestCmd) AddRealTimeFileListener(path string, listener opctx.LineListener) error + func (c *TestCmd) GetArgs() []string + func (c *TestCmd) Run(ctx context.Context) error + func (c *TestCmd) RunAndGetOutput(ctx context.Context) (string, error) + func (c *TestCmd) SetDescription(description string) opctx.Cmd + func (c *TestCmd) SetLongRunning(progressTitle string) opctx.Cmd + func (c *TestCmd) SetRealTimeStderrListener(listener opctx.LineListener) error + func (c *TestCmd) SetRealTimeStdoutListener(listener opctx.LineListener) error + func (c *TestCmd) SetStderr(_ io.Writer) + func (c *TestCmd) SetStdin(_ io.Reader) + func (c *TestCmd) SetStdout(_ io.Writer) + func (c *TestCmd) Start(ctx context.Context) error + func (c *TestCmd) Wait(ctx context.Context) error + type TestCmdFactory struct + ListenableFiles map[string]string + RunAndGetOutputHandler func(*exec.Cmd) (string, error) + RunHandler func(*exec.Cmd) error + Stderr string + Stdout string + func NewTestCmdFactory() *TestCmdFactory + func (f *TestCmdFactory) Command(cmd *exec.Cmd) (opctx.Cmd, error) + func (f *TestCmdFactory) CommandInSearchPath(name string) bool + func (f *TestCmdFactory) RegisterCommandInSearchPath(name string) + type TestCtx struct + AllPromptsAcceptedValue bool + CmdFactory *TestCmdFactory + Ctx context.Context + DryRunValue bool + Events []*TestEvent + PromptsAllowedValue bool + VerboseValue bool + func NewCtx(options ...TestCtxOption) *TestCtx + func (t *TestCtx) AllPromptsAccepted() bool + func (t *TestCtx) Command(cmd *exec.Cmd) (opctx.Cmd, error) + func (t *TestCtx) CommandInSearchPath(name string) bool + func (t *TestCtx) ConfirmAutoResolution(text string) bool + func (t *TestCtx) Deadline() (deadline time.Time, ok bool) + func (t *TestCtx) Done() <-chan struct{} + func (t *TestCtx) DryRun() bool + func (t *TestCtx) Err() error + func (t *TestCtx) Event(name string, args ...any) + func (t *TestCtx) FS() opctx.FS + func (t *TestCtx) OSEnv() opctx.OSEnv + func (t *TestCtx) PromptsAllowed() bool + func (t *TestCtx) StartEvent(name string, args ...any) opctx.Event + func (t *TestCtx) Value(key any) any + func (t *TestCtx) Verbose() bool + type TestCtxOption func(*TestCtx) + func WithFS(fs opctx.FS) TestCtxOption + func WithHostFS() TestCtxOption + func WithOSEnv(osEnv opctx.OSEnv) TestCtxOption + type TestEvent struct + Ended bool + LastTotalUnits int64 + LastUnitsCompleted int64 + LongRunningDescription string + Name string + func (t *TestEvent) End() + func (t *TestEvent) SetLongRunning(title string) + func (t *TestEvent) SetProgress(unitsComplete int64, totalUnits int64) + type TestOSEnv struct + func NewTestOSEnv() *TestOSEnv + func (env *TestOSEnv) Chdir(dir string) error + func (env *TestOSEnv) Getenv(key string) string + func (env *TestOSEnv) Getwd() (string, error) + func (env *TestOSEnv) IsCurrentUserMemberOf(groupName string) (isMember bool, err error) + func (env *TestOSEnv) LookupGroupID(groupName string) (gid int, err error) + func (env *TestOSEnv) SetEnv(key, value string)