testfix

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testfix copies a fixture to a temporary directory with some of its text replaced, for tests that need a variant of a fixture without a second copy in testdata, whose IDs would collide.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Variant

func Variant(t testing.TB, src string, oldnew ...string) string

Variant copies the tree at src into a temporary directory, replacing in every file each old string with its new one, in the order given, and returns the copy's root. A replacement that matches nothing fails the test, so a fixture that changes cannot silently stop exercising what the test means.

Types

This section is empty.

Jump to

Keyboard shortcuts

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