Documentation
¶
Overview ¶
Package testutils provides an interface for handling testdata files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
CreateTempFile attempts to create a temporary file named |name|. On success, it returns the path and the File object for the new file. On failure, returns an error.
var GetSourceFilePath func(projectRootRelative string) string
GetSourceFilePath returns a full path to a source file given a relative path from the root of the project repository.
var ReadSourceFile func(projectRootRelative string) ([]byte, error)
ReadSourceFile is similar to GetSourceFilePath but returns the file contents instead of its path.
Functions ¶
func CheckFilesEqual ¶
CheckFilesEqual ensures that the contents of the expected file has the same string contents, according to CheckStringsEqual, as the actual file.
func CheckStringsEqual ¶
CheckStringsEqual ensures that the actual string matches the expected. If the strings match, returns nil. If they do not, returns an error describing the difference.
Types ¶
This section is empty.