22 deleteTmpFiles(
"./test-result/");
24 FO_ASSERT_EQUAL(
exists, 0);
25 Filename =
"../testdata/ext2file.fs";
26 MkDirs(
"./test-result/ext2file.fs.dir");
29 FO_ASSERT_EQUAL(
Result, 0);
30 FO_ASSERT_EQUAL(
exists, 1);
41 deleteTmpFiles(
"./test-result/");
43 FO_ASSERT_EQUAL(
exists, 0);
44 Filename =
"../testdata/ext3file.fs";
45 MkDirs(
"./test-result/ext3file.fs");
48 FO_ASSERT_EQUAL(
Result, 0);
49 FO_ASSERT_EQUAL(
exists, 1);
61 deleteTmpFiles(
"./test-result/");
63 FO_ASSERT_EQUAL(
exists, 0);
64 Filename =
"../testdata/ext2file.fs";
65 MkDirs(
"./test-result/ext2file.fs.dir");
68 FO_ASSERT_EQUAL(
Result, 1);
69 FO_ASSERT_EQUAL(
exists, 0);
80 deleteTmpFiles(
"./test-result/");
82 FO_ASSERT_EQUAL(
exists, 0);
84 MkDirs(
"./test-result/fatfile.fs.dir");
87 FO_ASSERT_EQUAL(
Result, 0);
88 FO_ASSERT_EQUAL(
exists, 1);
99 deleteTmpFiles(
"./test-result/");
101 FO_ASSERT_EQUAL(
exists, 0);
102 Filename =
"../testdata/ntfsfile.fs";
103 MkDirs(
"./test-result/ntfsfile.fs.dir");
106 FO_ASSERT_EQUAL(
Result, 0);
107 FO_ASSERT_EQUAL(
exists, 1);
112 static char *Name = NULL;
120 Name = (
char *)malloc(100);
141 strcpy(Name,
"Fossology\0");
143 FO_ASSERT_EQUAL(strcmp(Name,
"fossology"), 0);
156 strcpy(Name,
"Fosso\0");
158 FO_ASSERT_EQUAL(strcmp(Name,
"fosso"), 0);
160 strcpy(Name,
"FOSSOLOGY HELLO\0");
162 FO_ASSERT_EQUAL(strcmp(Name,
"fossology hello"), 0);
173 strcpy(Name,
"Fosso (hello)");
175 FO_ASSERT_EQUAL(strcmp(Name,
"fosso"), 0);
188 FO_ASSERT_EQUAL(strcmp(Name,
""), 0);
static int Result
Result of calls.
int FatDiskNameInit()
initialize
void testFatDiskName3()
Convert to lowercase.
void testExtractDisk4Ext2FstypeUnknow()
unpack disk image, ext2, FStype is unknown
CU_TestInfo ununpack_disk_testcases[]
Disk image test cases.
int FatDiskNameClean()
clean env and others
void testExtractDisk4Ext2()
unpack disk image, ext2
void testExtractDisk4Ntfs()
unpack disk image, ntfs
void testFatDiskName1()
Convert to lowercase.
void testFatDiskNameNameEmpty()
Convert to lowercase.
void testFatDiskName2()
Convert to lowercase.
void testExtractDisk4Fat()
unpack disk image, fat
void testExtractDisk4Ext3()
unpack disk image, ext3
void FatDiskName(char *Name)
Special handling for FAT names.
int ExtractDisk(char *Source, char *FStype, char *Destination)
Given a disk image, type of system, and a directory, extract all files!
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.