FOSSology  4.4.0
Open Source License Compliance by Open Source Software
testDBCheckMime.c File Reference

Testing for the function DBCheckMime. More...

#include <CUnit/CUnit.h>
#include "finder.h"
#include <string.h>
Include dependency graph for testDBCheckMime.c:

Go to the source code of this file.

Functions

int DBCheckMimeInit ()
 Initialize DB.
 
int DBCheckMimeClean ()
 Clean the env.
 
void testDBCheckMime ()
 For function DBCheckMime() More...
 

Variables

static PGresult * result = NULL
 
static long upload_pk = -1
 
static long pfile_pk = -1
 
char * DBConfFile
 DB conf file location.
 
CU_TestInfo testcases_DBCheckMime []
 testcases for function DBCheckMime More...
 

Detailed Description

Testing for the function DBCheckMime.

Definition in file testDBCheckMime.c.

Function Documentation

◆ testDBCheckMime()

void testDBCheckMime ( )

For function DBCheckMime()

Test:
  1. Load a C file in database
  2. Pass a C file to DBCheckMime()
  3. Check if the mimetype from DB matches

Definition at line 221 of file testDBCheckMime.c.

Variable Documentation

◆ testcases_DBCheckMime

CU_TestInfo testcases_DBCheckMime[]
Initial value:
=
{
{"DBCheckMime:C", testDBCheckMime},
CU_TEST_INFO_NULL
}
void testDBCheckMime()
For function DBCheckMime()

testcases for function DBCheckMime

Definition at line 271 of file testDBCheckMime.c.