#include <criterion/criterion.h>#include "libtest/msg_parse_lib.h"#include "libtest/cr_template.h"#include "logmatcher.h"#include "apphook.h"#include "plugin.h"#include "cfg.h"#include "scratch-buffers.h"#include <stdlib.h>#include <string.h>
Functions | |
| void | testcase_match (const gchar *log, const gchar *pattern, gboolean expected_result, LogMatcher *m) |
| void | testcase_replace (const gchar *log, const gchar *re, gchar *replacement, const gchar *expected_result, LogMatcher *m) |
| void | setup (void) |
| void | teardown (void) |
| TestSuite (matcher,.init=setup,.fini=teardown) | |
| Test (matcher, pcre_regexp,.description="PCRE regexp") | |
| Test (matcher, back_ref) | |
| Test (matcher, empty_global,.description="empty match with global flag") | |
| Test (matcher, disable_jit) | |
| Test (matcher, string_match) | |
| Test (matcher, glob_match) | |
| Test (matcher, iso88592_never,.description="match in iso-8859-2 never matches") | |
| Test (matcher, replace) | |
| Test (matcher, pcre812_incompatibility,.description="tests a pcre 8.12 incompatibility") | |
| Test (matcher, test_matcher_sets_num_matches_upon_successful_matching) | |
| Test (matcher, test_matcher_captures_into_indirect_values) | |
| Test (matcher, test_matcher_builtins_are_captured_into_direct_values) | |
| Test (matcher, test_matcher_matches_against_macros_are_captured_directly) | |
| Test (matcher, test_matcher_matches_against_matches_are_captured_directly) | |
| Test (matcher, test_matcher_matches_against_buffers_are_captured_directly) | |
| Test (matcher, test_matcher_matches_are_captured_directly_if_source_handle_changes) | |
| Test (matcher, test_replace_works_correctly_if_capture_group_overwrites_the_input_in_a_match_variable) | |
| Test (matcher, test_replace_works_correctly_if_named_capture_group_overwrites_the_input) | |
| Test (matcher, test_replace_works_correctly_if_input_is_a_match_value_that_gets_truncated) | |
| void setup | ( | void | ) |
| void teardown | ( | void | ) |
| Test | ( | matcher | , |
| back_ref | |||
| ) |
| Test | ( | matcher | , |
| disable_jit | |||
| ) |
| Test | ( | matcher | , |
| empty_global | , | ||
| . | description = "empty match with global flag" |
||
| ) |
| Test | ( | matcher | , |
| glob_match | |||
| ) |
| Test | ( | matcher | , |
| iso88592_never | , | ||
| . | description = "match in iso-8859-2 never matches" |
||
| ) |
| Test | ( | matcher | , |
| pcre812_incompatibility | , | ||
| . | description = "tests a pcre 8.12 incompatibility" |
||
| ) |
| Test | ( | matcher | , |
| pcre_regexp | , | ||
| . | description = "PCRE regexp" |
||
| ) |
| Test | ( | matcher | , |
| replace | |||
| ) |
| Test | ( | matcher | , |
| string_match | |||
| ) |
| Test | ( | matcher | , |
| test_matcher_builtins_are_captured_into_direct_values | |||
| ) |
| Test | ( | matcher | , |
| test_matcher_captures_into_indirect_values | |||
| ) |
| Test | ( | matcher | , |
| test_matcher_matches_against_buffers_are_captured_directly | |||
| ) |
| Test | ( | matcher | , |
| test_matcher_matches_against_macros_are_captured_directly | |||
| ) |
| Test | ( | matcher | , |
| test_matcher_matches_against_matches_are_captured_directly | |||
| ) |
| Test | ( | matcher | , |
| test_matcher_matches_are_captured_directly_if_source_handle_changes | |||
| ) |
| Test | ( | matcher | , |
| test_matcher_sets_num_matches_upon_successful_matching | |||
| ) |
| Test | ( | matcher | , |
| test_replace_works_correctly_if_capture_group_overwrites_the_input_in_a_match_variable | |||
| ) |
| Test | ( | matcher | , |
| test_replace_works_correctly_if_input_is_a_match_value_that_gets_truncated | |||
| ) |
| Test | ( | matcher | , |
| test_replace_works_correctly_if_named_capture_group_overwrites_the_input | |||
| ) |
| void testcase_match | ( | const gchar * | log, |
| const gchar * | pattern, | ||
| gboolean | expected_result, | ||
| LogMatcher * | m | ||
| ) |
| void testcase_replace | ( | const gchar * | log, |
| const gchar * | re, | ||
| gchar * | replacement, | ||
| const gchar * | expected_result, | ||
| LogMatcher * | m | ||
| ) |