testhelper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanTmpDirs

func CleanTmpDirs(t *testing.T)

CleanTmpDirs cleans up previously created temporary directories.

func CreateZip

func CreateZip(filename string, files []TestFile) error

CreateZip creates a ZIP file for testing purposes.

func FileNotExists

func FileNotExists(t *testing.T, path string, msgAndArgs ...interface{}) bool

FileNotExists asserts that a given file should exist.

func ReadFile

func ReadFile(file string) (string, error)

ReadFile reads the textual content of a file.

func TmpDir

func TmpDir(t *testing.T, dir string, prefix string) string

TmpDir creates a new temporary directory for testing purposes.

Types

type TestFile

type TestFile struct {
	Name    string
	Content string
}

TestFile is a text file for bundling with a ZIP file.

Jump to

Keyboard shortcuts

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