test_common

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NonEmptyLines

func NonEmptyLines(str string) []string

func RunTests

func RunTests(t *testing.T, mainFn func(), tests []TestSpec)

Types

type TestResult

type TestResult struct {
	StdOut              string
	StdErr              string
	NonEmptyStdOutLines []string
	NonEmptyStdErrLines []string
}

func RunSingleTest

func RunSingleTest(mainFn func(), args ...string) TestResult

func (*TestResult) HasMatchingLine

func (t *TestResult) HasMatchingLine(pattern string) bool

type TestSpec

type TestSpec struct {
	Name     string
	Args     []string
	Expected string
}

Jump to

Keyboard shortcuts

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