Documentation ¶
Index ¶
- func CheckFs(t *testing.T, dir string, expected, actual filesys.FileSystem)
- func PrepareFs(t *testing.T, dirs []string, files map[string]string) (memory, actual filesys.FileSystem, test filesys.ConfirmedDir)
- func SetWorkingDir(t *testing.T, workingDir string)
- func SetupDir(t *testing.T, fSys filesys.FileSystem, dir string, files map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFs ¶
func CheckFs(t *testing.T, dir string, expected, actual filesys.FileSystem)
CheckFs checks actual, the real file system, against expected, a file system in memory, for contents in directory dir. CheckFs does not allow symlinks.
func PrepareFs ¶
func PrepareFs(t *testing.T, dirs []string, files map[string]string) ( memory, actual filesys.FileSystem, test filesys.ConfirmedDir)
PrepareFs returns an in-memory and the actual file system, both with the test directory with the file content mapping in files. dirs are the directory paths that need to be created to write the files.
func SetWorkingDir ¶
SetWorkingDir sets the working directory to workingDir and restores the original working directory after test completion.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.