testlib

package
v0.0.0-...-63ef27d Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package testlib provides common test utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustTempDir

func MustTempDir(tb testing.TB) string

MustTempDir creates a temporary directory (or dies trying), and changes the working directory to it. This temporary directory will be automatically removed upon test completion iff the test succeeded.

func Rewrite

func Rewrite(tb testing.TB, path, contents string) error

Rewrite a file with the given contents.

Types

This section is empty.

Jump to

Keyboard shortcuts

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