dittotesting

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Git added in v0.9.0

func Git(t *testing.T, dir string, args ...string)

Git runs one git command in a fixture, with the addressing this process inherited removed.

A hook exports GIT_DIR, GIT_INDEX_FILE and friends as absolute paths, and everything spawned below inherits them — so a fixture that kept them would quietly operate on the real checkout and succeed. They are REMOVED rather than blanked, because git rejects an empty GIT_DIR outright.

func GitRepository added in v0.9.0

func GitRepository(t *testing.T) string

GitRepository builds a throwaway repository with one committed Go file, tagged `base`, and returns its path. It is removed with the test's temporary directory.

func GitRepositoryWithAChange added in v0.9.0

func GitRepositoryWithAChange(t *testing.T) string

GitRepositoryWithAChange is GitRepository plus one committed Go change after the tag, which is the shape most of these questions are asked of.

func Source

func Source(doc string) []byte

func WriteFile added in v0.9.0

func WriteFile(t *testing.T, dir, name, content string)

WriteFile puts one file into a fixture, creating nothing else.

Types

This section is empty.

Jump to

Keyboard shortcuts

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