testlib

package
v0.0.0-...-720f34a Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 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