FreeRDP
TestCmdLine.c File Reference
#include <errno.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/tchar.h>
#include <winpr/cmdline.h>
#include <winpr/strlst.h>

Functions

static BOOL checkResult (size_t index, char **actual, size_t actualCount)
 
static BOOL TestCommandLineParseCommaSeparatedValuesEx (void)
 
int TestCmdLine (int argc, char *argv[])
 

Variables

static const char * testArgv []
 
static const char testListAppName [] = "test app name"
 
static const char * testListArgs []
 
static const char * testListArgs1 [] = { testListAppName, "a", "b", "c", "d" }
 
static const char * testListArgs2 [] = { testListAppName, "a:", "b:xxx, yyy", "c" }
 
static const char * testListArgs5 [] = { testListAppName, "a", "b", "c", "d d d", "fff" }
 
static const char * testListArgs6 [] = { testListAppName }
 
static const char * testListArgs7 [] = { testListAppName }
 
static const char * testListArgs8 [] = { testListAppName, "a", "b", "\"", "c" }
 
static const char * testListArgs9 [] = { testListAppName, "a", "b", "'", "c" }
 
static const char ** testListArgsResult []
 
static const size_t testListArgsCount []
 

Function Documentation

◆ checkResult()

static BOOL checkResult ( size_t  index,
char **  actual,
size_t  actualCount 
)
static
Here is the caller graph for this function:

◆ TestCmdLine()

int TestCmdLine ( int  argc,
char *  argv[] 
)
Here is the call graph for this function:

◆ TestCommandLineParseCommaSeparatedValuesEx()

static BOOL TestCommandLineParseCommaSeparatedValuesEx ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ testArgv

const char* testArgv[]
static
Initial value:
= { "mstsc.exe",
"+z",
"/w:1024",
"/h:768",
"/bpp:32",
"/admin",
"/multimon",
"+fonts",
"-wallpaper",
"/v:localhost:3389",
"/valuelist:value1,value2",
"/valuelist-empty:",
0 }

◆ testListAppName

const char testListAppName[] = "test app name"
static

◆ testListArgs

const char* testListArgs[]
static
Initial value:
= {
"a,b,c,d", "a:,\"b:xxx, yyy\",c", "a:,,,b", "a:,\",b", "\"a,b,c,d d d,fff\"", "",
NULL, "'a,b,\",c'", "\"a,b,',c\"", "', a, ', b,c'", "\"a,b,\",c\""
}
if availableBytes return NULL
Definition: TPCircularBuffer.h:109

◆ testListArgs1

const char* testListArgs1[] = { testListAppName, "a", "b", "c", "d" }
static

◆ testListArgs2

const char* testListArgs2[] = { testListAppName, "a:", "b:xxx, yyy", "c" }
static

◆ testListArgs5

const char* testListArgs5[] = { testListAppName, "a", "b", "c", "d d d", "fff" }
static

◆ testListArgs6

const char* testListArgs6[] = { testListAppName }
static

◆ testListArgs7

const char* testListArgs7[] = { testListAppName }
static

◆ testListArgs8

const char* testListArgs8[] = { testListAppName, "a", "b", "\"", "c" }
static

◆ testListArgs9

const char* testListArgs9[] = { testListAppName, "a", "b", "'", "c" }
static

◆ testListArgsCount

const size_t testListArgsCount[]
static
Initial value:
= {
0 ,
0 ,
0 ,
0
}
static const char * testListArgs6[]
Definition: TestCmdLine.c:33
static const char * testListArgs9[]
Definition: TestCmdLine.c:36
static const char * testListArgs5[]
Definition: TestCmdLine.c:32
static const char * testListArgs7[]
Definition: TestCmdLine.c:34
static const char * testListArgs8[]
Definition: TestCmdLine.c:35
static const char * testListArgs2[]
Definition: TestCmdLine.c:29
static const char * testListArgs1[]
Definition: TestCmdLine.c:28
#define ARRAYSIZE(A)
Definition: spec.h:935

◆ testListArgsResult

const char** testListArgsResult[]
static