morerequire

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package morerequire includes more require functions than "github.com/stretchr/testify/require" Do not add dependencies on any main code as it will cause cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireChdirIntoTemp

func RequireChdirIntoTemp(t *testing.T) func()

RequireChdirIntoTemp creates a new temp directory and cleans it up on with the returned function.

func RequireNewTempDir

func RequireNewTempDir(t *testing.T) (string, func())

RequireNewTempDir creates a new directory. The function returned cleans it up.

func RequireSetMtime

func RequireSetMtime(t *testing.T, dir, date string)

RequireSetMtime sets the mtime of the dir given a string formatted date. Ex "2006-01-02"

func RequireSetenv

func RequireSetenv(t *testing.T, key, value string) func()

RequireSetenv will os.Setenv the given key and value. The function returned reverts to the original.

Types

This section is empty.

Jump to

Keyboard shortcuts

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