copyrecursivetestwrapper

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceDataDirName          = "testdata"
	SourceRecursiveDirName     = "test-is-recursive"
	SourceIsSkipOnExistDirName = "test-skip-on-exist"
	PkgDirName                 = "PathHelper/CopyRecursive"
)

Variables

View Source
var (
	SrcTestDataDir = pathjoin.JoinNormalized(
		currentDir(), SourceDataDirName)
	SourceRecursivePath = pathjoin.JoinNormalized(
		SrcTestDataDir,
		SourceRecursiveDirName)
	Destination = pathjoin.WithTempTest(PkgDirName)

	RelPathOfSrcFiles = []string{
		filepath.Join("dir1", "a.txt"),
		filepath.Join("dir2", "b.txt"),
		"file1.txt",
		"file2.txt",
	}

	IndexOfExistingFilesInSkipOnExistDir    = []int{0, 2}
	IndexOfNonExistingFilesInSkipOnExistDir = []int{1, 3}
)
View Source
var CopyRecursiveTestCases = []CopyRecursiveTestWrapper{
	{
		Header:                 "",
		IsClearDestinationPre:  true,
		IsClearDestinationPost: true,
		CopyInstruction: copyrecursive.Instruction{
			SourceDestination: copyrecursive.SourceDestination{
				Source:      SourceRecursivePath,
				Destination: Destination,
			},
			Options: copyrecursive.Options{
				IsSkipOnExist:      false,
				IsRecursive:        true,
				IsClearDestination: false,
				IsUseShellOrCmd:    false,
				IsNormalize:        false,
				IsExpandVar:        false,
			},
		},
		ErrorCollectionVerifier: errverify.CollectionVerifier{
			Verifier: errverify.Verifier{
				Header:       "",
				FunctionName: "TestCopierRecursive_3",
				VerifyAs:     stringcompareas.Equal,
				IsPrintError: true,
			},
			ExpectationLines: &corestr.SimpleSlice{
				Items: []string{},
			},
			ErrorLength: 0,
		},
	},
}

Functions

This section is empty.

Types

type CopyRecursiveTestWrapper

type CopyRecursiveTestWrapper struct {
	Header                                        string
	IsClearDestinationPre, IsClearDestinationPost bool
	CopyInstruction                               copyrecursive.Instruction
	ErrorCollectionVerifier                       errverify.CollectionVerifier
}

Jump to

Keyboard shortcuts

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