From 28d6710c0a11bcaa5de3a611650ff3655488a0f6 Mon Sep 17 00:00:00 2001 From: bjt-user Date: Sun, 17 Nov 2024 10:04:29 +0100 Subject: [PATCH] second unit test works with meson and found source of bug --- unit-tests/meson.build | 5 +++++ unit-tests/test_pretty_print_date_time.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/unit-tests/meson.build b/unit-tests/meson.build index d2c18ea..06b809a 100644 --- a/unit-tests/meson.build +++ b/unit-tests/meson.build @@ -4,3 +4,8 @@ t1e = executable('test_print_upcoming', 'test_print_upcoming.c', '../src/parse_i '../src/list_handling.c', '../src/date_time_handling.c', '../src/read_until_string.c', '../src/read_until_nl.c') test('test print_upcoming', t1e) + +t2e = executable('test_pretty_print_date_time', 'test_pretty_print_date_time.c', '../src/string_handling.c', \ +'../src/date_time_handling.c', '../src/read_until_string.c', '../src/read_until_nl.c') + +test('test pretty_print_date_time', t2e) diff --git a/unit-tests/test_pretty_print_date_time.c b/unit-tests/test_pretty_print_date_time.c index 2e4c555..8d8f58e 100644 --- a/unit-tests/test_pretty_print_date_time.c +++ b/unit-tests/test_pretty_print_date_time.c @@ -11,4 +11,8 @@ int main() { printf("\n\ncurrent_date: %s\n", current_date); printf("strlen(current_date): %ld\n", strlen(current_date)); + + pretty_print_date_time("20251215T080000Z"); + + return 0; }