Documentation ¶
Index ¶
- func AutoTest(startno int, fn func(*Testcase) error) error
- func CompareErrors(err1 error, err2 error) error
- func EveryFlag() []int
- func EveryPermission() []os.FileMode
- func ForEveryFlag(fn func(flag int) error) error
- func ForEveryPermission(fn func(mode os.FileMode) error) error
- func FsTestDir(fs absfs.FileSystem, path string) (testdir string, cleanup func(), err error)
- type ErrorReport
- type ErrorString
- type Testcase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoTest ¶
GenerateTestcases runs all tests on the `os` package to establish baseline results that can be used to test that `absfs` FileSystems are consistent with native file system support. If not `nil` GenerateTestcases will call `fn` with each generated testcase. If `fn` returns an error then testcase generation will stop and GenerateTestcases will return an the same error and the testcases crated so far. (TODO: many tests still to be added to exercise the entire FileSystem interface)
func CompareErrors ¶
func EveryPermission ¶
func ForEveryFlag ¶
func FsTestDir ¶
func FsTestDir(fs absfs.FileSystem, path string) (testdir string, cleanup func(), err error)
FsTestDir Creates a timestamped folder for filesystem testing, and changes directory to it. Returns the path to the new directory, a cleanup function and an error. The `cleanup` method changes the directory back to the original location and removes testdir and all of it's contents.
Types ¶
type ErrorReport ¶
type ErrorReport struct { Op string Path string Err error StackStr string TypeStr string ErrStr string }
func NewErrorReport ¶
func NewErrorReport(op, path string, err error, stackstr string) *ErrorReport
func (*ErrorReport) Equal ¶
func (e *ErrorReport) Equal(r *ErrorReport) bool
func (*ErrorReport) Error ¶
func (e *ErrorReport) Error() string
func (*ErrorReport) Stack ¶
func (e *ErrorReport) Stack() string
func (*ErrorReport) String ¶
func (e *ErrorReport) String() string
func (*ErrorReport) Type ¶
func (e *ErrorReport) Type() string
func (*ErrorReport) TypesEqual ¶
func (e *ErrorReport) TypesEqual(r *ErrorReport) bool
type ErrorString ¶
type ErrorString struct {
Err string
}
func (*ErrorString) Error ¶
func (e *ErrorString) Error() string