Documentation
¶
Index ¶
- func Action(t *testing.T) string
- func ChdirTemp(t *testing.T) func()
- func CopyFile(t *testing.T, src string, dest string, mode os.FileMode)
- func CorruptFile(t *testing.T, path string)
- func Fill(t *testing.T, fp io.Writer, size int64)
- func TempCopy(t *testing.T, src string, mode os.FileMode) (string, func())
- func TempDir(t *testing.T) (string, func())
- func TempFile(t *testing.T, size int64) (string, func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChdirTemp ¶
ChdirTemp changes the working directory to a new TempDir. The cleanup function returns to the previous working directoy and removes the temp directory.
func CopyFile ¶
CopyFile copies data from one file another. If the target file does not exist then it will be created with the given mode. This is a non-optimal copy and not intended to be used for very large files.
func CorruptFile ¶
CorruptFile writes an string to the beginning of the file.
func TempCopy ¶
TempCopy copies provided file to a new temp file that will be assigned the provided mode after the copy. (So the mode can specify a read-only file.)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.