FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Testing for the function CheckMimeTypes, GetDefaultMime, GetFieldValue. More...
#include <CUnit/CUnit.h>
#include "finder.h"
#include <string.h>
Go to the source code of this file.
Functions | |
int | CheckMimeTypes (char *Ext) |
Given an extension, see if extension exists in the /etc/mime.types. More... | |
int | DBCheckFileExtention () |
Given a pfile, identify any filenames and see if any of them have a known extension based on /etc/mime.types. More... | |
char * | GetFieldValue (char *Sin, char *Field, int FieldMax, char *Value, int ValueMax) |
Given a string that contains field='value' pairs, save the items. More... | |
int | DBInit () |
initialize DB | |
int | DBClean () |
clean the env | |
void | testCheckMimeTypes () |
for function CheckMimeTypes() More... | |
void | testDBCheckFileExtention () |
for function DBCheckFileExtention() More... | |
void | testGetFieldValue () |
for function GetFieldValue() More... | |
Variables | |
char * | DBConfFile |
DB conf file location. | |
static PGresult * | result = NULL |
static long | upload_pk = -1 |
static long | pfile_pk = -1 |
CU_TestInfo | testcases_CheckMimeTypes [] |
testcases for function CheckMimeTypes More... | |
CU_TestInfo | testcases_DBCheckFileExtention [] |
testcases for function DBCheckFileExtention More... | |
CU_TestInfo | testcases_Utilities [] |
testcases for function GetFieldValue More... | |
Testing for the function CheckMimeTypes, GetDefaultMime, GetFieldValue.
Definition in file testOtheFunctions.c.
int CheckMimeTypes | ( | char * | Ext | ) |
int DBCheckFileExtention | ( | ) |
char* GetFieldValue | ( | char * | Sin, |
char * | Field, | ||
int | FieldMax, | ||
char * | Value, | ||
int | ValueMax | ||
) |
Given a string that contains field='value' pairs, save the items.
[in] | Sin | Input string |
[out] | Field | Field string |
[in] | FieldMax | Capacity of Field |
[out] | Value | Value string |
[in] | ValueMax | Capacity of Field |
void testCheckMimeTypes | ( | ) |
for function CheckMimeTypes()
bin
extension in mimetype tablebin
extension from CheckMimeTypes()Definition at line 212 of file testOtheFunctions.c.
void testDBCheckFileExtention | ( | ) |
for function DBCheckFileExtention()
Definition at line 299 of file testOtheFunctions.c.
void testGetFieldValue | ( | ) |
for function GetFieldValue()
field='value'
formatDefinition at line 343 of file testOtheFunctions.c.
CU_TestInfo testcases_CheckMimeTypes[] |
testcases for function CheckMimeTypes
Definition at line 357 of file testOtheFunctions.c.
CU_TestInfo testcases_DBCheckFileExtention[] |
testcases for function DBCheckFileExtention
Definition at line 368 of file testOtheFunctions.c.
CU_TestInfo testcases_Utilities[] |
testcases for function GetFieldValue
Definition at line 379 of file testOtheFunctions.c.