OpenVPN 3 Core Library
Loading...
Searching...
No Matches
test_parseargv.cpp File Reference
Include dependency graph for test_parseargv.cpp:

Go to the source code of this file.

Functions

 TEST (argv, parse)
 
 TEST (argv, portoffset1)
 
 TEST (argv, portoffset2)
 
static void extract_auth_token (const OptionList &opt)
 
static void verify_topology (const OptionList &opt)
 
static void extract_ifconfig (const OptionList &opt)
 
 TEST (argv, parsetest)
 
static void csv_test (const std::string &str)
 
static void space_test (const std::string &str, const std::string &expected)
 
static void options_csv_test (const std::string &str, const std::string &elem)
 
 TEST (argv, parsetest1)
 
 TEST (argv, QuotesTest)
 

Variables

static std::string expected
 
static const char * input []
 
static const char config []
 

Function Documentation

◆ csv_test()

static void csv_test ( const std::string &  str)
static

Definition at line 166 of file test_parseargv.cpp.

Here is the caller graph for this function:

◆ extract_auth_token()

static void extract_auth_token ( const OptionList opt)
static

Definition at line 109 of file test_parseargv.cpp.

Here is the caller graph for this function:

◆ extract_ifconfig()

static void extract_ifconfig ( const OptionList opt)
static

Definition at line 124 of file test_parseargv.cpp.

Here is the caller graph for this function:

◆ options_csv_test()

static void options_csv_test ( const std::string &  str,
const std::string &  elem 
)
static

Definition at line 189 of file test_parseargv.cpp.

Here is the caller graph for this function:

◆ space_test()

static void space_test ( const std::string &  str,
const std::string &  expected 
)
static

Definition at line 180 of file test_parseargv.cpp.

Here is the caller graph for this function:

◆ TEST() [1/6]

TEST ( argv  ,
parse   
)

Definition at line 57 of file test_parseargv.cpp.

◆ TEST() [2/6]

TEST ( argv  ,
parsetest   
)

Definition at line 134 of file test_parseargv.cpp.

◆ TEST() [3/6]

TEST ( argv  ,
parsetest1   
)

Definition at line 229 of file test_parseargv.cpp.

◆ TEST() [4/6]

TEST ( argv  ,
portoffset1   
)

Definition at line 70 of file test_parseargv.cpp.

◆ TEST() [5/6]

TEST ( argv  ,
portoffset2   
)

Definition at line 91 of file test_parseargv.cpp.

◆ TEST() [6/6]

TEST ( argv  ,
QuotesTest   
)

Definition at line 238 of file test_parseargv.cpp.

◆ verify_topology()

static void verify_topology ( const OptionList opt)
static

Definition at line 116 of file test_parseargv.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ config

const char config[]
static
Initial value:
= "listen 1.2.3.4 1000 tcp 2\n"
"listen 0.0.0.0 4000 tcp 4*N\n"
"listen ::0 8000 tcp\n"
"listen sock/ststrack-%s.sock unix-stream\n"

Definition at line 65 of file test_parseargv.cpp.

◆ expected

std::string expected
static
Initial value:
= "0 [errors-to-stderr]\n"
"1 [log] [/Library/Application Support/OpenVPN/log/ovpn3_yonan_net_p0977.log]\n"
"2 [config] [stdin]\n"
"3 [proto-force] [udp]\n"
"4 [management] [/Library/Application Support/OpenVPN/sock/ovpn-6QSai9SzvRcm.sock] [unix]\n"
"5 [setenv] [UV_ASCLI_VER] [2.0.18.200]\n"
"6 [setenv] [UV_PLAT_REL] [12.5.0]\n"
"7 [auth-nocache]\n"
"8 [management-hold]\n"
"9 [management-client]\n"
"10 [management-query-passwords]\n"
"11 [management-query-remote]\n"
"12 [management-up-down]\n"
"13 [management-client-user] [root]\n"
"14 [allow-pull-fqdn]\n"
"15 [auth-retry] [interact]\n"
"16 [push-peer-info]\n"
"17 [setenv] [UV_ASCLI_VER] [2.0.18.200]\n"
"18 [setenv] [UV_PLAT_REL] [12.5.0]\n"

Definition at line 11 of file test_parseargv.cpp.

◆ input

const char* input[]
static
Initial value:
= {
"unittest",
"--errors-to-stderr",
"--log", "/Library/Application Support/OpenVPN/log/ovpn3_yonan_net_p0977.log",
"--config", "stdin",
"--proto-force", "udp",
"--management", "/Library/Application Support/OpenVPN/sock/ovpn-6QSai9SzvRcm.sock",
"unix",
"--setenv", "UV_ASCLI_VER", "2.0.18.200",
"--setenv", "UV_PLAT_REL", "12.5.0",
"--auth-nocache",
"--management-hold",
"--management-client",
"--management-query-passwords",
"--management-query-remote",
"--management-up-down",
"--management-client-user", "root",
"--allow-pull-fqdn",
"--auth-retry", "interact",
"--push-peer-info",
"--setenv", "UV_ASCLI_VER", "2.0.18.200",
"--setenv", "UV_PLAT_REL", "12.5.0"
}

Definition at line 31 of file test_parseargv.cpp.