go2hx

manual

github

Module: stdgo.testing.fstest

(view library index)

Overview

Index

Classes

import

class Fstest

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

Fstest function testDash

function testDash(_t:stdgo._internal.testing.T_):Void

(view code)

Fstest function testFS

function testFS(_fsys:stdgo._internal.io.fs.FS, _expected:haxe.Rest<String>):stdgo.Error
TestFS tests a file system implementation.
        It walks the entire tree of files in fsys,
        opening and checking that each file behaves correctly.
        It also checks that the file system contains at least the expected files.
        As a special case, if no expected files are listed, fsys must be empty.
        Otherwise, fsys must contain at least the listed files; it can also contain others.
        The contents of fsys must not change concurrently with TestFS.

If TestFS finds any misbehaviors, it returns an error reporting all of them. The error text spans multiple lines, one per detected misbehavior.

Typical usage inside a test is:

        	if err := fstest.TestFS(myFS, "file/that/should/be/present"); err != nil {
        		t.Fatal(err)
}

(view code)

Fstest function testMapFS

function testMapFS(_t:stdgo._internal.testing.T_):Void

(view code)

Fstest function testMapFSChmodDot

function testMapFSChmodDot(_t:stdgo._internal.testing.T_):Void

(view code)

Fstest function testShuffledFS

function testShuffledFS(_t:stdgo._internal.testing.T_):Void

(view code)

Fstest function testSymlink

function testSymlink(_t:stdgo._internal.testing.T_):Void

(view code)

Typedefs

import

typedef MapFS

typedef MapFS = stdgo._internal.testing.fstest.MapFS;

typedef T_shuffledFS

typedef T_shuffledFS = stdgo._internal.testing.fstest.T_shuffledFS;

Abstracts

abstract MapFile

(view file containing code)

abstract T_fsOnly

(view file containing code)

abstract T_noSub

(view file containing code)

abstract T_mapFileInfo

(view file containing code)

abstract T_openMapFile

(view file containing code)

abstract T_mapDir

(view file containing code)

abstract T_fsTester

(view file containing code)

abstract T_shuffledFile

(view file containing code)