21 #include "run_tests.h" 24 static char *
Src =
"";
25 static char *
Dst = NULL;
36 Dst = (
char *)malloc(100);
61 Src =
"../testdata/test.iso";
62 deleteTmpFiles(
"./test-result/");
63 strcpy(
Dst,
"./test-result/hello");
68 FO_ASSERT_EQUAL(
Result, 0);
81 strcpy(
Dst,
"./test-result/hello");
82 deleteTmpFiles(
"./test-result/");
85 FO_ASSERT_EQUAL(
exists, 0);
86 FO_ASSERT_EQUAL(
Result, 1);
99 strcpy(
Dst,
"./test-result/hello");
100 deleteTmpFiles(
"./test-result/");
103 FO_ASSERT_EQUAL(
exists, 0);
104 FO_ASSERT_EQUAL(
Result, 1);
static struct stat statDst
Stat of destination.
static int Result
Result of calls.
void testCopyFileNormalFile()
copy directory
int file_dir_exists(char *path_name)
test if a file or directory exists
void testCopyFileAbnormal()
parameters are null
void CopyFile(char *Source, char *Type, char *Name)
int CopyFileClean()
clean env and others
static char * Src
Souce location.
static struct stat statSrc
Stat of source.
static char * Dst
Destination location.
void testCopyFileNormalDir()
copy directory
int CopyFileInit()
initialize
int exists
Default not exists.
CU_TestInfo CopyFile_testcases[]
Copy test cases.