testutil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chdir

func Chdir(t *testing.T, dir string)

Chdir changes the current working directory to the named directory and registers a cleanup function on the provided `t` to restore working directory to its initial value once the test completes.

func CreateFile

func CreateFile(t *testing.T, dir string, file string, content string)

CreateFile creates or updates the given `file` in the given `dir` with the given `content` and registers a cleanup function on the provided `t` to remove the file once the test completes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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