diff options
Diffstat (limited to 'src/test/test-log.c')
-rw-r--r-- | src/test/test-log.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/test/test-log.c b/src/test/test-log.c index cfbd45c2e3..4fc4bc9087 100644 --- a/src/test/test-log.c +++ b/src/test/test-log.c @@ -116,7 +116,7 @@ static void test_log_context(void) { _cleanup_(log_context_unrefp) LogContext *ctx = NULL; char **strv = STRV_MAKE("SIXTH=ijn", "SEVENTH=PRP"); - assert_se(ctx = log_context_new(strv, /*owned=*/ false)); + assert_se(ctx = log_context_new_strv(strv, /*owned=*/ false)); assert_se(log_context_num_contexts() == 1); assert_se(log_context_num_fields() == 2); @@ -160,6 +160,17 @@ static void test_log_context(void) { test_log_syntax(); } + { + LOG_CONTEXT_PUSH_KEY_VALUE("ABC=", "QED"); + LOG_CONTEXT_PUSH_KEY_VALUE("ABC=", "QED"); + assert_se(log_context_num_contexts() == 1); + assert_se(log_context_num_fields() == 1); + + test_log_struct(); + test_long_lines(); + test_log_syntax(); + } + assert_se(log_context_num_contexts() == 0); assert_se(log_context_num_fields() == 0); } |