testutil

package
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package testutil provides process test fixtures for gokit process tests and downstream users.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgvRecorder

type ArgvRecorder struct {
	Binary     string
	OutputPath string
}

ArgvRecorder is an executable test double that records the exact argv values it receives.

func NewArgvRecorder

func NewArgvRecorder(t *testing.T) *ArgvRecorder

NewArgvRecorder creates an executable process fake that records argv values one per line.

func (*ArgvRecorder) Args

func (r *ArgvRecorder) Args(t *testing.T) []string

Args reads the argv values recorded by the most recent run.

func (*ArgvRecorder) Command

func (r *ArgvRecorder) Command(args ...string) process.Command

Command returns a process command that invokes the recorder with args as literal argv values.

Jump to

Keyboard shortcuts

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