12 static char *Fname =
"";
14 static char *
Dst = NULL;
23 Dst = (
char *)malloc(100);
46 Fname =
"../testdata/null_file";
48 strcpy(
Dst,
"./test-result/nullfile");
53 FO_ASSERT_EQUAL(
exists, 0);
54 FO_ASSERT_EQUAL(
Result, 1);
65 Fname =
"../testdata/test.ar";
67 strcpy(
Dst,
"./test-result/test.ar");
72 FO_ASSERT_EQUAL(
exists, 1);
73 FO_ASSERT_EQUAL(
Result, 0);
83 void testPruneCharFile()
85 Fname =
"../testdata/ext2file.fs";
89 FO_ASSERT_EQUAL(
exists, 0);
90 FO_ASSERT_EQUAL(
Result, 1);
void CopyFile(char *Source, char *Type, char *Name)
static int Result
Result of calls.
static char * Dst
Destination location.
void testPruneRegFile()
regular file, size is great than 0
CU_TestInfo Prune_testcases[]
Prune() test cases.
void testPruneFileFileSzieIs0()
regular file, size is 0
int PruneInit()
initialize
int PruneClean()
clean env and others
int Prune(char *Fname, struct stat Stat)
Given a filename and its stat, prune it.
int file_dir_exists(char *path_name)
test if a file or directory exists
int exists
Default not exists.
char * NewDir
Test result directory.