Documentation ¶
Index ¶
- Variables
- func AssertContentToFile(t *testing.T, gotContent, wantFile string)
- func AssertFilesEquals(t *testing.T, gotPath, wantPath string)
- func NewWriter(t *testing.T) (dir string, writer filewriter.FileWriter)
- func ReadFile(t *testing.T, file string) string
- func ReadFileAsBytes(t *testing.T, file string) []byte
- func SanitizePath(s string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var UpdateGoldenFiles = flag.Bool("update", false, "update golden files")
Functions ¶
func AssertContentToFile ¶
func AssertFilesEquals ¶
func NewWriter ¶
func NewWriter(t *testing.T) (dir string, writer filewriter.FileWriter)
func SanitizePath ¶
SanitizePath sanitizes s so its usable as a path name. For safety, it assumes all characters that are not A-Z, a-z, 0-9, _ or - are illegal and replaces them with _.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.