exampletestutil

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertMainContains

func AssertMainContains(t *testing.T, mainFunc func(), command string, want ...string)

AssertMainContains verifies one example main entrypoint writes expected text.

func AssertRunArgsHumanStyled

func AssertRunArgsHumanStyled(t *testing.T, runArgs func(io.Writer, []string) error, want ...string)

AssertRunArgsHumanStyled verifies one example emits styled human output.

func AssertRunArgsInvalidFlag

func AssertRunArgsInvalidFlag(t *testing.T, runArgs func(io.Writer, []string) error)

AssertRunArgsInvalidFlag verifies one example returns a parse error.

func AssertRunArgsPlainContains

func AssertRunArgsPlainContains(t *testing.T, runArgs func(io.Writer, []string) error, want ...string)

AssertRunArgsPlainContains verifies one example renders expected plain output.

func StripANSI

func StripANSI(value string) string

StripANSI removes ANSI escape sequences for stable assertions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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