Documentation ¶
Index ¶
- Constants
- Variables
- func MakeTestFiles(t sktest.TestingT) string
- func TestFS(ctx context.Context, t sktest.TestingT, fs vfs.FS)
- func TestVFS_MultiWrite_ChangedToOriginal(t sktest.TestingT, fs vfs.FS)
- func TestVFS_ReadOnly(t sktest.TestingT, fs vfs.FS)
- func TestVFS_ReadWrite(t sktest.TestingT, fs vfs.FS)
Constants ¶
View Source
const (
FakeFileName = "rootFile"
)
Variables ¶
View Source
var ( FakeContents = []byte(`hello world`) FakeFileInfo = vfs.FileInfo{ Name: FakeFileName, Size: int64(len(FakeContents)), Mode: 0666, ModTime: time.Time{}, IsDir: false, Sys: nil, }.Get() )
Functions ¶
func MakeTestFiles ¶
MakeTestFiles creates a temporary directory containing the files and directories expected by TestFS.
func TestFS ¶
TestFS tests a vfs.FS implementation. It expects the passed-in FS to have the following structure:
./ subDir/ subDirFile => "subDirFile contents" rootFile => FakeContents
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.