From 20b08c08e6ec36ba0326dc491a9d179d6519ab45 Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 1 Dec 2022 22:02:19 +0100 Subject: Implement colored output for test --- tests/get_domainpart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/get_domainpart.c b/tests/get_domainpart.c index e05aee1..92b7918 100644 --- a/tests/get_domainpart.c +++ b/tests/get_domainpart.c @@ -14,10 +14,10 @@ int main(void) char *result = get_domainpart(input); if (strcmp(result, expected) == 0) { - printf("Unit test passed - ok\n"); + printf("Unit test passed - \033[;32mok\033[0m\n"); return 0; } else { - printf("'%s' != '%s'!\n", result, expected); + printf("'%s' != '%s' - \033[;31mfailed\033[0m\n", result, expected); return 1; } } -- cgit v1.2.3-70-g09d2