syslog-ng source
test_glob_selector.c File Reference
#include <criterion/criterion.h>
#include "add-contextual-data-glob-selector.h"
#include "scratch-buffers.h"
#include "string-list.h"
#include "logmsg/logmsg.h"
#include "cfg.h"
#include "apphook.h"
Include dependency graph for test_glob_selector.c:

Macros

#define _assert_resolved_value(selector, msg, expected_value)
 
#define _assert_resolved_value_is_null(selector, msg)
 

Functions

 Test (add_contextual_data_glob_selector, glob_selector_finds_first_expr_that_matches_the_expanded_template)
 
 Test (add_contextual_data_glob_selector, glob_selector_finds_first_expr_that_matches_the_expanded_template2)
 
 Test (add_contextual_data_glob_selector, glob_selector_yields_NULL_if_no_pattern_matches)
 
 TestSuite (add_contextual_data_glob_selector,.init=startup,.fini=teardown)
 

Macro Definition Documentation

◆ _assert_resolved_value

#define _assert_resolved_value (   selector,
  msg,
  expected_value 
)
Value:
do { \
gchar *resolved = add_contextual_data_selector_resolve(selector, msg); \
cr_assert_str_eq(resolved, expected_value, "resolved value mismatch: %s != %s", resolved, expected_value); \
g_free(resolved); \
} while (0)
LogMessage * msg
Definition: test_rename.c:35

◆ _assert_resolved_value_is_null

#define _assert_resolved_value_is_null (   selector,
  msg 
)
Value:
do { \
gchar *resolved = add_contextual_data_selector_resolve(selector, msg); \
cr_assert_null(resolved, "unexpected non-NULL value: %s", resolved); \
} while (0)

Function Documentation

◆ Test() [1/3]

Test ( add_contextual_data_glob_selector  ,
glob_selector_finds_first_expr_that_matches_the_expanded_template   
)

◆ Test() [2/3]

Test ( add_contextual_data_glob_selector  ,
glob_selector_finds_first_expr_that_matches_the_expanded_template2   
)

◆ Test() [3/3]

Test ( add_contextual_data_glob_selector  ,
glob_selector_yields_NULL_if_no_pattern_matches   
)

◆ TestSuite()

TestSuite ( add_contextual_data_glob_selector  ,
init = startup,
fini = teardown 
)