cstest

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const FileNotFoundMessage = "no such file or directory"

Variables

This section is empty.

Functions

func AssertErrorContains added in v1.3.1

func AssertErrorContains(t *testing.T, err error, expectedErr string)

func AssertErrorMessage added in v1.5.0

func AssertErrorMessage(t *testing.T, err error, expectedErr string)

func Interpolate added in v1.5.0

func Interpolate(s string, data interface{}) (string, error)

Interpolate fills a string template with the given values, can be map or struct. example: Interpolate("{{.Name}}", map[string]string{"Name": "JohnDoe"})

func RequireErrorContains added in v1.4.2

func RequireErrorContains(t *testing.T, err error, expectedErr string)

func RequireErrorMessage added in v1.5.0

func RequireErrorMessage(t *testing.T, err error, expectedErr string)

func RequireLogContains added in v1.5.0

func RequireLogContains(t *testing.T, hook *logtest.Hook, expected string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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