summaryrefslogtreecommitdiffstats
path: root/liblog_destroy_context.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-02-22 00:54:23 +0100
committerMattias Andrée <m@maandree.se>2025-02-22 00:54:23 +0100
commit1aa5c5fcc55f65bb48396a6fb45af060eb24b8e6 (patch)
tree21d6c69c2f64226e98c28413a8e95534c36f939f /liblog_destroy_context.c
parentFix doc style (diff)
downloadliblog-1aa5c5fcc55f65bb48396a6fb45af060eb24b8e6.tar.gz
liblog-1aa5c5fcc55f65bb48396a6fb45af060eb24b8e6.tar.bz2
liblog-1aa5c5fcc55f65bb48396a6fb45af060eb24b8e6.tar.xz
m fix + add testsHEADmaster
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--liblog_destroy_context.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/liblog_destroy_context.c b/liblog_destroy_context.c
index 57192ac..6a3fa09 100644
--- a/liblog_destroy_context.c
+++ b/liblog_destroy_context.c
@@ -27,6 +27,20 @@ liblog_destroy_context(struct liblog_context *ctx)
#else
-int main(void) {return 0;} /* TODO test */
+int
+main(void)
+{
+ struct liblog_context ctx;
+ char *nullenv[] = {NULL};
+
+ environ = nullenv;
+
+ ASSERT_ZERO(liblog_destroy_context(NULL));
+
+ ASSERT_ZERO(liblog_init_context(&ctx));
+ ASSERT_ZERO(liblog_destroy_context(&ctx));
+
+ return 0;
+}
#endif