test

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Test

type Test struct {
	Name        string
	Input       string
	WantOutput  string
	WantError   bool
	WantExitErr bool
}

Test represents a test case for a script

type TestRunner

type TestRunner struct {
	// contains filtered or unexported fields
}

TestRunner handles executing tests in a controlled environment

func NewTestRunner

func NewTestRunner() (*TestRunner, error)

NewTestRunner creates a new test runner with a temporary working directory

func (*TestRunner) Cleanup

func (r *TestRunner) Cleanup() error

Cleanup removes the temporary working directory

func (*TestRunner) RunTest

func (r *TestRunner) RunTest(ctx context.Context, mainScript, testScript string) error

RunTest executes a test script in a controlled environment

Jump to

Keyboard shortcuts

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