17 #include "run_tests.h" 22 static char *Label =
"";
29 MagicCookie = magic_open(MAGIC_PRESERVE_ATIME|MAGIC_MIME);
32 fprintf(stderr,
"FATAL: Failed to initialize magic cookie\n");
57 Filename =
"../testdata/testthree.zip";
58 deleteTmpFiles(
"./test-result/");
60 FO_ASSERT_EQUAL(
exists, 0);
63 FO_ASSERT_EQUAL(
exists, 1);
75 deleteTmpFiles(
"./test-result/");
77 FO_ASSERT_EQUAL(
exists, 0);
80 FO_ASSERT_EQUAL(
exists, 1);
int file_dir_exists(char *path_name)
test if a file or directory exists
int TraverseStartInit()
initialize
void testTraverseStartNormal()
Test TraverseStart() for normal file.
int TraverseStartClean()
clean env and others
CU_TestInfo TraverseStart_testcases[]
TraverseStart() test cases.
char * NewDir
Test result directory.
magic_t MagicCookie
for Magic
int exists
Default not exists.
void TraverseStart(char *Filename, char *Label, char *NewDir, int Recurse)
Find all files (assuming a directory) and process (unpack) all of them.
int Recurse
Level of unpack recursion. Default to infinite.
void testTraverseStartDir()
test TraverseStart() for directory