From 670461a51e44eb743586213581e23f730efe80cd Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Tue, 14 Mar 2023 20:28:35 +0100 Subject: Carriage return fix --- source/kit_test/test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/kit_test') diff --git a/source/kit_test/test.c b/source/kit_test/test.c index e60413a..ed7e7a7 100644 --- a/source/kit_test/test.c +++ b/source/kit_test/test.c @@ -195,6 +195,7 @@ int kit_run_tests(int argc, char **argv) { !carriage_return || no_color || print_color(yellow); carriage_return || no_color || print_color(light); quiet || printf("` %s ", kit_tests_list.tests[i].test_name); + !carriage_return || quiet || printf("\r"); quiet || fflush(stdout); struct timespec begin, end; @@ -218,10 +219,9 @@ int kit_run_tests(int argc, char **argv) { total_assertion_count += kit_tests_list.tests[i].assertions; - if (carriage_return) { - no_color || print_color(light); - quiet || printf("\r` %s ", kit_tests_list.tests[i].test_name); - } + !carriage_return || no_color || print_color(light); + !carriage_return || quiet || + printf("` %s ", kit_tests_list.tests[i].test_name); int const l = (int) strlen(kit_tests_list.tests[i].test_name); quiet || printf("%*c", line_width - l, ' '); -- cgit v1.2.3