archivetest

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package archivetest contains the shared testing utility of all archive implementations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFile

func AddFile(archive archive.Writer, t *testing.T)

AddFile tests if a file can be added to the archive without errors and that the written size equals to the byte size

func AddFileByPath

func AddFileByPath(archive archive.Writer, t *testing.T)

AddFileByPath tests if a file can be added to the archive without errors and that the written size equals to the byte size

func GenerateTestFiles

func GenerateTestFiles(t *testing.T, writer archive.Writer)

GenerateTestFiles generates a new archive with the passed files

func GetFile

func GetFile(t *testing.T, reader archive.Reader)

GetFile tests if all generated files can get retrieved from the generated archive

func GetFiles

func GetFiles(t *testing.T, reader archive.Reader)

GetFiles checks if all added files are contained in the archive

func GetSharedTestFiles

func GetSharedTestFiles() map[string]string

GetSharedTestFiles returns the shared test files/file content for the unit tests

Types

This section is empty.

Jump to

Keyboard shortcuts

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