package
0.0.0-20241018223127-a062be16fda2
Repository: https://github.com/activestate/cli.git
Documentation: pkg.go.dev
# Functions
CaptureStderr will execute a provided function and capture anything written to stderr.
CaptureStdout will execute a provided function and capture anything written to stdout.
CopyTestFileToConfigDir copies a file in a relatve `testdata` dir to the caller of this function to the config dir as some target filename with some target FileMode.
CreateConfigFile will create a file in the config dir with the given file name.
GetTestDataDir returns the path to the caller's `testdata` directory.
GetTestFile returns the path to the given fileName in the calling function's `testdata` directory.
PrepareDir prepares a path for use in tests (ensures it exists and ensures the path is concistent).
ReadConfigFile will read the contents of a file in the config dir.
ReadTestFile will read the contents of a file from the `testdata` directory relative to the path of the calling function file.
RemoveConfigFile will remove a file from the config dir with the given file name.
StatConfigFile returns the os.FileInfo for a file in the config dir.
WrapStdin will fill stdin with the lines provided as a variadic list of strings before executing the provided function.
WrapStdinWithDelay will fill stdin with the lines provided, but with a given delay before each write.