assertfile

package
v0.0.0-...-8268868 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFileContentsEquals

func AssertFileContentsEquals(t *testing.T, actualPath string, expectedContents []byte, msgAndArgs ...any) bool

func AssertFileEquals

func AssertFileEquals(t *testing.T, actualPath string, expectedPath string, msgAndArgs ...any) bool

Types

type FileSuite

type FileSuite struct {
	suite.Suite
}

func (*FileSuite) FileContentsEquals

func (f *FileSuite) FileContentsEquals(actualPath string, expectedContents []byte, msgAndArgs ...any) bool

FileContentsEquals checks whether a file matches the passed contents. It also fails if the path points to a directory or there is an error when trying to check the file.

func (*FileSuite) FileEquals

func (f *FileSuite) FileEquals(actualPath string, expectedPath string, msgAndArgs ...any) bool

FileEquals checks whether the file contents match. It also fails if the paths point to a directory or there is an error when trying to check a file.

Jump to

Keyboard shortcuts

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