testutil

package
v0.0.0-...-2e1bc12 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoldenFile

func GoldenFile(t *testing.T) []byte

GoldenFile reads the content of the golden file of the current test.

func GoldenFileNamed

func GoldenFileNamed(t *testing.T, filename string) []byte

GoldenFileNamed reads the content of the given golden file.

func SetUpFromFileContent

func SetUpFromFileContent(t *testing.T, filename string, content string) string

SetUpFromFileContent creates a temp file based on the given file content.

func SetUpFromGoldenDir

func SetUpFromGoldenDir(t *testing.T) string

SetUpFromGoldenDir populates a temp directory based on the given test name.

func SetUpFromGoldenDirNamed

func SetUpFromGoldenDirNamed(t *testing.T, testname string) string

SetUpFromGoldenDir populates a temp directory based on the given golden dir name.

func SetUpFromGoldenFile

func SetUpFromGoldenFile(t *testing.T) string

SetUpFromGoldenFile creates a temp file based on the golden file of the current test. The file must exist in directory testdata/.

func SetUpFromGoldenFileNamed

func SetUpFromGoldenFileNamed(t *testing.T, filename string) string

SetUpFromGoldenFileNamed creates a temp file based on the given golden file name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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