17 #include "run_tests.h" 34 deleteTmpFiles(
"./test-result/");
36 FO_ASSERT_EQUAL(
exists, 0);
37 MkDirs(
"./test-result/test.ar.dir/");
41 FO_ASSERT_EQUAL(
exists, 1);
42 FO_ASSERT_EQUAL(
Result, 0);
53 deleteTmpFiles(
"./test-result/");
55 FO_ASSERT_EQUAL(
exists, 0);
56 MkDirs(
"./test-result/test.deb.dir/");
60 FO_ASSERT_EQUAL(
exists, 1);
61 FO_ASSERT_EQUAL(
Result, 0);
72 deleteTmpFiles(
"./test-result/");
74 FO_ASSERT_EQUAL(
exists, 0);
76 FO_ASSERT_EQUAL(
Result, 1);
87 deleteTmpFiles(
"./test-result/");
89 FO_ASSERT_EQUAL(
exists, 0);
90 MkDirs(
"./test-result/test.rpm.dir/");
93 FO_ASSERT_EQUAL(
Result, 1);
static int Result
Result of calls.
int file_dir_exists(char *path_name)
test if a file or directory exists
void testExtractAR4EmptyParameters()
abnormal parameters
CU_TestInfo ExtractAR_testcases[]
AR test cases.
int ExtractAR(char *Source, char *Destination)
Given an AR file, extract the contents to the directory. This uses the command ar.
void testExtractAR4DebFile()
unpack deb file
void testExtractAR4ArchiveLibraryFile()
unpack archive library file
void testExtractAR4ErrorParameters()
abnormal parameters
int exists
Default not exists.
int MkDirs(char *Fname)
Same as command-line "mkdir -p".