10 #include "run_tests.h"
13 static char *
Src =
"";
14 static char *
Dst = NULL;
25 Dst = (
char *)malloc(100);
50 Src =
"../testdata/test.iso";
51 deleteTmpFiles(
"./test-result/");
52 strcpy(
Dst,
"./test-result/hello");
57 FO_ASSERT_EQUAL(
Result, 0);
70 strcpy(
Dst,
"./test-result/hello");
71 deleteTmpFiles(
"./test-result/");
74 FO_ASSERT_EQUAL(
exists, 0);
75 FO_ASSERT_EQUAL(
Result, 1);
88 strcpy(
Dst,
"./test-result/hello");
89 deleteTmpFiles(
"./test-result/");
92 FO_ASSERT_EQUAL(
exists, 0);
93 FO_ASSERT_EQUAL(
Result, 1);
void CopyFile(char *Source, char *Type, char *Name)
void testCopyFileNormalFile()
copy directory
int CopyFileClean()
clean env and others
int CopyFileInit()
initialize
static struct stat statSrc
Stat of source.
static int Result
Result of calls.
CU_TestInfo CopyFile_testcases[]
Copy test cases.
static struct stat statDst
Stat of destination.
void testCopyFileNormalDir()
copy directory
void testCopyFileAbnormal()
parameters are null
static char * Dst
Destination location.
static char * Src
Souce location.
int file_dir_exists(char *path_name)
test if a file or directory exists
int exists
Default not exists.