23 deleteTmpFiles(
"./test-result/");
25 FO_ASSERT_EQUAL(
exists, 0);
26 MkDirs(
"./test-result/test.ar.dir/");
30 FO_ASSERT_EQUAL(
exists, 1);
31 FO_ASSERT_EQUAL(
Result, 0);
42 deleteTmpFiles(
"./test-result/");
44 FO_ASSERT_EQUAL(
exists, 0);
45 MkDirs(
"./test-result/test.deb.dir/");
49 FO_ASSERT_EQUAL(
exists, 1);
50 FO_ASSERT_EQUAL(
Result, 0);
61 deleteTmpFiles(
"./test-result/");
63 FO_ASSERT_EQUAL(
exists, 0);
65 FO_ASSERT_EQUAL(
Result, 1);
76 deleteTmpFiles(
"./test-result/");
78 FO_ASSERT_EQUAL(
exists, 0);
79 MkDirs(
"./test-result/test.rpm.dir/");
82 FO_ASSERT_EQUAL(
Result, 1);
static int Result
Result of calls.
CU_TestInfo ExtractAR_testcases[]
AR test cases.
void testExtractAR4DebFile()
unpack deb file
void testExtractAR4EmptyParameters()
abnormal parameters
void testExtractAR4ArchiveLibraryFile()
unpack archive library file
void testExtractAR4ErrorParameters()
abnormal parameters
int ExtractAR(char *Source, char *Destination)
Given an AR file, extract the contents to the directory. This uses the command ar.
int MkDirs(char *Fname)
Same as command-line "mkdir -p".
int file_dir_exists(char *path_name)
test if a file or directory exists
int exists
Default not exists.