testutil

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTempFile

func CreateTempFile(t *testing.T, pattern string, content string) *os.File

CreateTempFile creates a temporary file with the specified content

func WithConfigurationDirectory added in v1.2.1

func WithConfigurationDirectory(t *testing.T, test func(*testing.T, string)) func(*testing.T)

WithConfigurationDirectory creates a temporary directory and sets it as the configuration directory

func WithTempDir

func WithTempDir(t *testing.T, test func(*testing.T, string)) func(*testing.T)

WithTempDir wraps a test function with a temporary directory to be used during the test

func WithTempFile

func WithTempFile(t *testing.T, pattern string, content string, callback func(*os.File))

WithTempFile wraps a test function with a temporary file

Types

This section is empty.

Jump to

Keyboard shortcuts

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