This commit is contained in:
admju
2024-09-05 07:26:32 +00:00
parent a7a5465a22
commit dddd5d1831
11 changed files with 152 additions and 91 deletions

View File

@@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
)
func TestCopyFileExist(t *testing.T){
func TestCopyFileExist(t *testing.T) {
src := filepath.Join(TEST_SRC_DIR, "fichier1")
dest := filepath.Join(TEST_DEST_DIR, "fichier1")
@@ -45,3 +45,13 @@ func TestCopyErrSrcWrite(t *testing.T) {
assert.NotNilf(t, err, "CopyFile error %s", src)
}
func TestCopyContentFile(t *testing.T) {
content := "TestCopyContentFileExist"
dest := filepath.Join(TEST_DEST_DIR, "fichier1")
err := CopyContentFile(content, dest)
assert.Nilf(t, err, "error message")
assert.FileExists(t, dest, "CopyFile error")
}