Documentation
¶
Index ¶
- func Chdir(t *testing.T, dir string)
- func CombinedPaths(environ []string) string
- func Create(t *testing.T, name string)
- func CreateNoCleanup(t *testing.T, name string)
- func Setenv(t *testing.T, key string, value string)
- func Setenvs(t *testing.T, envContext map[string]string)
- func Unsetenv(t *testing.T, key string)
- func Unsetenvs(t *testing.T, keys []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chdir ¶
Chdir changes the current working directory to the named directory. The working directory is automatically restored as part of Cleanup.
func CombinedPaths ¶
CombinedPaths collects all PATH strings from the provided environment variables, in the form of 'PATH=<path>', and combines them into a single PATH string, also in the form of 'PATH=<collected paths>'. It returns an empty string if no PATH strings are found.
func Create ¶
Create creates or truncates the named file. If the file already exists, it is truncated. If the file does not exist, it is created with mode 0666 (before umask). Files created are automatically removed during test Cleanup. Ignores errors due to the file already being deleted.
func CreateNoCleanup ¶
Create creates or truncates the named file. If the file already exists, it is truncated. If the file does not exist, it is created with mode 0666 (before umask).
func Setenvs ¶
Setenvs sets the provided environment variables keys with their corresponding values. Any set values are automatically restored during test Cleanup.
Types ¶
This section is empty.