OpenVPN
Functions
test_search_and_replace.c File Reference
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <setjmp.h>
#include <cmocka.h>
#include "utils.h"
Include dependency graph for test_search_and_replace.c:

Go to the source code of this file.

Functions

static void pass_any_null_param__returns_null (void **state)
 
static void pass_any_empty_string__returns_null (void **state)
 
static void replace_single_char__one_time__match_is_replaced (void **state)
 
static void replace_single_char__multiple_times__match_all_matches_are_replaced (void **state)
 
static void replace_longer_text__multiple_times__match_all_matches_are_replaced (void **state)
 
static void pattern_not_found__returns_original (void **state)
 
int main (void)
 

Function Documentation

◆ main()

int main ( void  )

◆ pass_any_empty_string__returns_null()

static void pass_any_empty_string__returns_null ( void **  state)
static

Definition at line 23 of file test_search_and_replace.c.

References searchandreplace().

Referenced by main().

◆ pass_any_null_param__returns_null()

static void pass_any_null_param__returns_null ( void **  state)
static

Definition at line 12 of file test_search_and_replace.c.

References searchandreplace().

Referenced by main().

◆ pattern_not_found__returns_original()

static void pattern_not_found__returns_original ( void **  state)
static

Definition at line 68 of file test_search_and_replace.c.

References searchandreplace().

Referenced by main().

◆ replace_longer_text__multiple_times__match_all_matches_are_replaced()

static void replace_longer_text__multiple_times__match_all_matches_are_replaced ( void **  state)
static

Definition at line 57 of file test_search_and_replace.c.

References searchandreplace().

Referenced by main().

◆ replace_single_char__multiple_times__match_all_matches_are_replaced()

static void replace_single_char__multiple_times__match_all_matches_are_replaced ( void **  state)
static

Definition at line 46 of file test_search_and_replace.c.

References searchandreplace().

Referenced by main().

◆ replace_single_char__one_time__match_is_replaced()

static void replace_single_char__one_time__match_is_replaced ( void **  state)
static

Definition at line 35 of file test_search_and_replace.c.

References searchandreplace().

Referenced by main().