utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTestRuntimes

func RunTestRuntimes(t *testing.T, tests ...TestSpec)

func StringFlags

func StringFlags(opts ...string) func(t *testing.T, workdir string) []string

func WantPrompt

func WantPrompt(prompt string, inputoutput ...[2]string) func(t *testing.T, workdir string, in io.Writer, out io.Reader)

func WantPromptWithWorkdir

func WantPromptWithWorkdir(prompt string, inputoutputFunc func(workdir string) [][2]string) func(t *testing.T, workdir string, in io.Writer, out io.Reader)

func WantString

func WantString(wantstr string) func(t *testing.T, workdir string, in io.Writer, out io.Reader)

Types

type Input

type Input struct {
	Image       string
	ConvertOpts []string
}

type TestSpec

type TestSpec struct {
	Name        string
	Inputs      []Input
	Prepare     func(t *testing.T, workdir string)
	Finalize    func(t *testing.T, workdir string)
	ImageName   string // default: test.wasm
	Runtime     string
	RuntimeOpts func(t *testing.T, workdir string) []string
	Args        func(t *testing.T, workdir string) []string
	Want        func(t *testing.T, workdir string, in io.Writer, out io.Reader)
	NoParallel  bool
}

Jump to

Keyboard shortcuts

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