localizertest

package
v0.13.4 Latest Latest
Warning

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

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

Documentation

Index

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

func SetWorkingDir(t *testing.T, workingDir string)

SetWorkingDir sets the working directory to workingDir and restores the original working directory after test completion.

func SetupDir

func SetupDir(t *testing.T, fSys filesys.FileSystem, dir string,
	files map[string]string)

SetupDir creates each file, specified by the file name to content mapping in files, under dir on fSys

Types

This section is empty.

Jump to

Keyboard shortcuts

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