test

package
v0.0.0-...-3b0921d Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateGoldenFiles = flag.Bool("update", false, "update golden files")

Functions

func AssertContentToFile

func AssertContentToFile(t *testing.T, gotContent, wantFile string)

func AssertFilesEquals

func AssertFilesEquals(t *testing.T, gotPath, wantPath string)

func NewWriter

func NewWriter(t *testing.T) (dir string, writer filewriter.FileWriter)

func ReadFile

func ReadFile(t *testing.T, file string) string

func ReadFileAsBytes

func ReadFileAsBytes(t *testing.T, file string) []byte

func SanitizePath

func SanitizePath(s string) string

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.

Jump to

Keyboard shortcuts

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