testing

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: GPL-3.0, LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(file *os.File) func() string

Capture redirects the provided file's file descriptor (typically os.Stderr) to a pipe, allowing all output written to that file descriptor to be captured. It returns a function that, when called, restores the original file descriptor, closes the pipe, and returns the captured output as a string. This is useful for capturing and inspecting output during tests.

func RunForkTest

func RunForkTest(testName string) (string, string, error)

Run a fork test that may crash or exit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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