Documentation
¶
Overview ¶
Package testutil provides reusable test utilities for the vel CLI test suite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureStdout ¶
CaptureStdout captures stdout during function execution and returns the output as a string. The function is run synchronously and stdout is restored after completion.
func StripANSI ¶
StripANSI removes ANSI escape codes from a string. This is useful for comparing terminal output that contains color codes.
func WithEnv ¶
WithEnv runs a function with the specified environment variables set. After the function completes, all environment variables are restored to their original values (or unset if they didn't exist).
func WithTempDir ¶
WithTempDir creates a temporary directory, changes to it, runs the provided function, then restores the original working directory. The temp directory is automatically cleaned up by t.TempDir().
Types ¶
This section is empty.