FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
testing for the function GetURL() More...
#include <CUnit/CUnit.h>
#include "wget_agent.h"
#include "utility.h"
#include "libfodbreposysconf.h"
Go to the source code of this file.
Functions | |
int | GetURLInit () |
initialize | |
int | GetURLClean () |
clean the env | |
void | testGetURLNormal_URLIsOneFile () |
The URL is one file. More... | |
void | testGetURLAbnormal_URLIsOneDir () |
the URL is one dir More... | |
Variables | |
static char | TempFile [MAX_LENGTH] |
static char | URL [MAX_LENGTH] |
static char | TempFileDir [MAX_LENGTH] |
CU_TestInfo | testcases_GetURL [] |
testcases for function GetURL More... | |
testing for the function GetURL()
int GetURL(char *TempFile, char *URL, char *TempFileDir) char *TempFile - used when upload from URL by the scheduler, the downloaded file(directory) will be archived as this file when running from command, this parameter is null, e.g. /var/local/lib/fossology/agents/wget.32732
char *URL - the url you want to download
char *TempFileDir - where you want to store your downloaded file(directory)
return int, 0 on success, non-zero on failure.
Definition in file testGetURL.c.
void testGetURLAbnormal_URLIsOneDir | ( | ) |
the URL is one dir
TempFileDir is ./test_result TempFile is not empty
Definition at line 86 of file testGetURL.c.
void testGetURLNormal_URLIsOneFile | ( | ) |
The URL is one file.
TempFileDir is ./test_result, TempFile is empty
Definition at line 65 of file testGetURL.c.
CU_TestInfo testcases_GetURL[] |
testcases for function GetURL
Definition at line 100 of file testGetURL.c.