summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/test_umberlog.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/test_umberlog.c b/t/test_umberlog.c
index 33ed8bf..b0085c6 100644
--- a/t/test_umberlog.c
+++ b/t/test_umberlog.c
@@ -236,6 +236,24 @@ test_facprio (void)
json_object_put (jo);
}
+static void
+test_closelog (void)
+{
+ char *msg;
+ struct json_object *jo;
+
+ openlog ("umberlog/test_closelog", LOG_UL_NODISCOVER, LOG_LOCAL0);
+ closelog ();
+
+ msg = ul_format (LOG_LOCAL1 | LOG_DEBUG, "%s", __FUNCTION__, NULL);
+ jo = parse_msg (msg);
+ free (msg);
+
+ verify_value (jo, "facility", "local1");
+
+ json_object_put (jo);
+}
+
int
main (void)
{
@@ -246,6 +264,7 @@ main (void)
test_no_timestamp ();
test_json_escape ();
test_facprio ();
+ test_closelog ();
return 0;
}