Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestArchive ¶
TestArchive wraps a *txtar.Archive and adds the filename of the archive
Use ar.ReadFileData( name ) []byte to get an archived file's data - []byte{} is returned if the archived file does not exist
See also as.HasFile( name ) to check for existence of a file in the archive
func TestArchives ¶
func TestArchives() []*TestArchive
TestArchives provides shared access to all .txtar files for testing etc in multiple packages
Usage:
for _, ar := range test.TestArchives() { givenInput := ar.ReadFileData( "input" ) wantOutput := ar.ReadFileData( "output" ) gotOutput := doSomething( input ) if gotOutput != wantOutput { ... } }
Click to show internal directories.
Click to hide internal directories.