Help us shape the future of Go! Take the 2026 Go Developer Survey

fsconformance

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package fsconformance provides a shared conformance test suite for the tool.Workspace interface. Adapters (osfs, memfs, ...) call Run with a factory that constructs a fresh workspace, and the suite exercises only the tool.Workspace interface.

Importing "testing" in a non-_test.go file is intentional here: this is a test-helper package whose sole purpose is to be imported by adapter tests, the conventional Go pattern for shared conformance suites (cf. testing/fstest).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newWS func(t *testing.T) tool.Workspace)

Run executes the shared Workspace conformance table against the workspace produced by newWS. newWS must return a fresh, isolated workspace each call.

func RunNamespace added in v0.15.0

func RunNamespace(t *testing.T, newWS func(t *testing.T) tool.Workspace)

RunNamespace executes the shared tool.WorkspaceNamespace conformance table against the workspace produced by newWS. newWS must return a fresh, isolated workspace each call, and the workspace it returns must implement tool.WorkspaceNamespace (memfs, osfs, redisstore — the POSIX-like namespace adapters); a workspace that does not (ACP, no-fs) pins its own contract directly rather than through this shared suite. Namespace operations are deliberately NOT part of RunNamespace's setup path (setFile stays content-only via CreateFile/ReplaceFile); every case here exercises ReadDir/Remove/Rename/ CopyFile end to end so adapters cannot silently diverge on error-wrapping or on the "directories are derived from file paths" contract.

Types

This section is empty.

Jump to

Keyboard shortcuts

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