The tests can be executed with "make test". More...
Macros | |
#define | TEST_TAB " " |
Tabulator to indent messages from test programs. | |
#define | TEST_PERM (posix_mode_t) (POSIX_S_IRUSR | POSIX_S_IWUSR) |
Permissions for test files. | |
#define | CHECK_RV(rv) |
Check return value of test. More... | |
#define | SKIP_TEST(s) |
Skip test and print info message. More... | |
#define | TEST_CMPR_USE_NETWORK 0 |
Use real network connection to echo daemon instead of regular file. | |
Functions | |
void | ts_environ_init (void) |
Copy environment variables. More... | |
void | ts_environ_exit (void) |
Destroy copy of environment variables. More... | |
void | print_error (const char *msg) |
Print error message. More... | |
int | main (int argc, char **argv) |
Test entry point. More... | |
int | test_base64 (void) |
Test enc_mime_encode_base64() implementation. More... | |
int | test_cancellock (void) |
Test core_get_cancel_lock() implementation. More... | |
int | test_compression (void) |
Test cmpr_send() and cmpr_recv() implementation. More... | |
int | test_inet_pton (void) |
Test posix_inet_pton() implementation. More... | |
int | test_regex (void) |
Test posix_regcomp() and posix_regexec() implementation. More... | |
int | test_snprintf (void) |
Test posix_snprintf() implementation. More... | |
int | test_strcasecmp_l (void) |
Test posix_strcasecmp_l() implementation. More... | |
int | test_timestamp (void) |
Test enc_timestamp_decode() implementation. More... | |
int | test_unicode (void) |
Test enc_convert_to_utf8_nfc() implementation. More... | |
Variables | |
int | main_debug = 0 |
Enable additional debug output if nonzero. | |
const char * | main_confprefix = NULL |
Configuration directory path from command line option (always NULL ) More... | |
The tests can be executed with "make test".
#define CHECK_RV | ( | rv | ) |
#define SKIP_TEST | ( | s | ) |
int main | ( | int | argc, |
char ** | argv | ||
) |
Test entry point.
[in] | argc | Number of command line arguments |
[in] | argv | Array containing command line argument strings |
Exit status of program:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 124 of file test.cxx.
References ts_environ_init().
void print_error | ( | const char * | msg | ) |
Print error message.
Exported as C style function
[in] | msg | Message to display on stderr |
Definition at line 99 of file test.cxx.
Referenced by test_inet_pton(), test_snprintf(), and test_strcasecmp_l().
int test_base64 | ( | void | ) |
Test enc_mime_encode_base64()
implementation.
The following cases are tested:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 39 of file test_base64.c.
int test_cancellock | ( | void | ) |
Test core_get_cancel_lock()
implementation.
The following cases are tested:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 38 of file test_cancellock.c.
int test_compression | ( | void | ) |
Test cmpr_send()
and cmpr_recv()
implementation.
The following cases are tested:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 82 of file test_compression.c.
int test_inet_pton | ( | void | ) |
Test posix_inet_pton()
implementation.
The following cases are tested:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 40 of file test_inet_pton.c.
References print_error(), and TEST_TAB.
int test_regex | ( | void | ) |
Test posix_regcomp()
and posix_regexec()
implementation.
The following cases are tested:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 79 of file test_regex.c.
int test_snprintf | ( | void | ) |
Test posix_snprintf()
implementation.
The following cases are tested:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 50 of file test_snprintf.c.
References print_error(), and TEST_TAB.
int test_strcasecmp_l | ( | void | ) |
Test posix_strcasecmp_l()
implementation.
The following cases are tested using POSIX locale:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 44 of file test_strcasecmp_l.c.
References print_error(), and TEST_TAB.
int test_timestamp | ( | void | ) |
Test enc_timestamp_decode()
implementation.
The following cases are tested:
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 44 of file test_timestamp.c.
int test_unicode | ( | void | ) |
Test enc_convert_to_utf8_nfc()
implementation.
Part 1: The following cases are tested:
Part2: The Unicode normalization conformance test data file is used.
EXIT_SUCCESS
on successEXIT_FAILURE
on error Definition at line 347 of file test_unicode.c.
void ts_environ_exit | ( | void | ) |
Destroy copy of environment variables.
Call this function once after last use of ts_getenv()
.
Definition at line 107 of file ts_functions.c.
void ts_environ_init | ( | void | ) |
Copy environment variables.
Must be called once before ts_getenv()
is used and before additional threads are created.
Definition at line 58 of file ts_functions.c.
Referenced by main().
const char* main_confprefix = NULL |
Configuration directory path from command line option (always NULL
)
Configuration directory path from command line option or NULL
otherwise.
Definition at line 76 of file test.cxx.
Referenced by xdg_get_confdir().