8 #include <CUnit/CUnit.h>
9 #include "wget_agent.h"
17 static char Source[MAX_LENGTH];
18 static char TempFileDir[MAX_LENGTH];
54 strcpy(Source,
"38 - https://mirrors.kernel.org/fossology/releases/3.0.0/ubuntu/ -l 1 -R *.deb");
55 strcpy(TempFileDir,
"./test_result");
56 SetEnv(Source, TempFileDir);
59 CU_ASSERT_PTR_NOT_NULL(cptr);
60 CU_ASSERT_STRING_EQUAL(
GlobalURL,
"https://mirrors.kernel.org/fossology/releases/3.0.0/ubuntu/");
61 CU_ASSERT_STRING_EQUAL(
GlobalParam,
"-l 1 -R *.deb");
int SetEnvInit()
initialize
int SetEnvClean()
clean the env
void testSetEnvNormal()
set the global variables
CU_TestInfo testcases_SetEnv[]
testcases for function SetEnv
char GlobalParam[STRMAX]
Additional parameters.
char GlobalURL[URLMAX]
URL to download.
void SetEnv(char *S, char *TempFileDir)
Convert input pairs into globals.
long GlobalUploadKey
Input for this system.
char GlobalTempFile[STRMAX]
Temp file to be used.