testutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package testutil provides shared test helpers for ingitdb-cli tests.

The package contains no production code. It is intentionally placed under `internal/` so it can only be imported by other packages in this module, and its functions accept `*testing.T` so they can only be called from test code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustErrContain

func MustErrContain(t testing.TB, err error, substrs ...string)

MustErrContain asserts that err is non-nil and its message contains every substring in substrs. It reports failure via t.Fatalf. t.Helper() makes the failure point at the test that called MustErrContain rather than this line.

Example:

_, err := parseInput(badInput)
testutil.MustErrContain(t, err, "$content", "collide")

Types

This section is empty.

Jump to

Keyboard shortcuts

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