package
0.22.0-dev
Repository: https://github.com/elves/elvish.git
Documentation: pkg.go.dev

# Functions

ApplyDir creates the given filesystem layout in the current directory.
ApplyDirIn creates the given filesystem layout in a given directory.
Chdir changes into a directory, and restores the original working directory when a test finishes.
ChmodOrSkip runs [os.Chmod], but skips the test if file's mode is not exactly mode or if there is any error.
Dedent removes an optional leading newline, and removes the indentation present in the first line from all subsequent non-empty lines.
InTempDir is equivalent to Chdir(c, TempDir(c)).
InTempHome is equivalent to Setenv(c, env.HOME, InTempDir(c)).
SaveEnv saves the current value of an environment variable so that it will be restored after a test has finished.
Scaled returns d scaled by $E:ELVISH_TEST_TIME_SCALE.
Setenv sets the value of an environment variable for the duration of a test.
TempDir creates a temporary directory for testing that will be removed after the test finishes.
TempHome is equivalent to Setenv(c, env.HOME, TempDir(c)).
TestTimeScale parses $E:ELVISH_TEST_TIME_SCALE, defaulting to 1 it it's not set or can't be parsed as a float64.
Umask sets the umask for the duration of the test, and restores it afterwards.
Setenv unsets an environment variable for the duration of a test.

# Structs

File describes a file to create.

# Interfaces

Cleanuper wraps the Cleanup method.
Skipper wraps the Skipf method.

# Type aliases

Dir describes the layout of a directory.