baseline

package
v0.0.0-...-0a7d128 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const NoContent = "<no content>"

Variables

This section is empty.

Functions

func DiffText

func DiffText(oldName string, newName string, expected string, actual string) string

func Run

func Run(t *testing.T, fileName string, actual string, opts Options)

func RunAgainstSubmodule

func RunAgainstSubmodule(t *testing.T, fileName string, actual string, opts Options)

func Track

func Track() func()

Track sets up baseline tracking and returns a cleanup function that writes the tracking file. It should be called from TestMain using defer:

func TestMain(m *testing.M) {
    defer baseline.Track()()
    m.Run()
}

Types

type Options

type Options struct {
	Subfolder           string
	IsSubmodule         bool
	IsSubmoduleAccepted bool
	DiffFixupOld        func(string) string
	DiffFixupNew        func(string) string
	SkipDiffWithOld     bool
}

Jump to

Keyboard shortcuts

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