resultspecs

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoOp = Action(iota)
	Equal
	Added
	Removed
	InnerChanges
)

Variables

This section is empty.

Functions

func Save

func Save(w io.Writer, results []engine.TestResult) error

Types

type Action

type Action int

type CheckEdit

type CheckEdit struct {
	Name   string
	Action Action
	Lines  []LineEdit
}

type CheckOutputSpec

type CheckOutputSpec struct {
	Name string   `yaml:"name"`
	Data []string `yaml:"data"`
}

type CommandEdit

type CommandEdit struct {
	Name   string
	Action Action
	Checks []CheckEdit
}

type CommandResultSpec

type CommandResultSpec struct {
	Command string            `yaml:"command"`
	Checks  []CheckOutputSpec `yaml:"checks"`
}

type LineEdit

type LineEdit struct {
	Line   string
	Action Action
}

type TestEdit

type TestEdit struct {
	Name     string
	Action   Action
	Commands []CommandEdit
}

func Compare

func Compare(oldspecs []TestResultSpec, newspecs []TestResultSpec) (edits []TestEdit, differs bool, err error)

type TestResultSpec

type TestResultSpec struct {
	Name     string              `yaml:"name"`
	Commands []CommandResultSpec `yaml:"commands"`
}

func FromTestResult

func FromTestResult(result engine.TestResult) (TestResultSpec, error)

func Load

func Load(r io.Reader) (specs []TestResultSpec, err error)

Jump to

Keyboard shortcuts

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