wfstest

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package wfstest implements support for testing implementations and users of file systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestWriteFileFS

func TestWriteFileFS(fsys fs.FS, tmpDir string) error

TestWriteFileFS tests a wfs.WriteFileFS implementation.

Typical usage inside a test is:

tmpDir, err := ioutil.TempDir("", "test")
if err != nil {
  t.Fatal(err)
}
defer os.RemoveAll(tmpDir)

fsys := osfs.New(filepath.Dir(tmpDir))
if err := wfstest.TestWriteFileFS(fsys, filepath.Base(tmpDir)); err != nil {
  t.Fatal(err)
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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