From b2182396df5d99ff5c26161aaffa5ced879742c5 Mon Sep 17 00:00:00 2001 From: axtlos Date: Fri, 27 Sep 2024 21:31:47 +0200 Subject: Fix join_str on musl and add manpage --- tests/driver.c | 2 +- tests/test_join_str.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/driver.c b/tests/driver.c index 235d598..d3739b5 100644 --- a/tests/driver.c +++ b/tests/driver.c @@ -21,7 +21,7 @@ test_runner (struct test_t *test, int n) if (test_result == 0) printf ("Test Case %d: %s -- %sSUCCESS%s\n\n", n, test->test_name, success, reset); else - printf ("Test Case %d: %s -- %sFAIL %d%s\n\n", n, test->test_name, test_result, fail, reset); + printf ("Test Case %d: %s -- %sFAIL %d%s\n\n", n, test->test_name, fail, test_result, reset); } void diff --git a/tests/test_join_str.c b/tests/test_join_str.c index 711c864..f756b2e 100644 --- a/tests/test_join_str.c +++ b/tests/test_join_str.c @@ -11,9 +11,9 @@ test_join_str () for (int i = 0; i < 3; i++) test_string[i] = strdup ("hello"); - char *joined_string = join_str (test_string, 3, ' '); + char *joined_string = join_str (test_string, 3, " && "); - if (strcmp (joined_string, "hello hello hello") != 0) + if (strcmp (joined_string, "hello && hello && hello") != 0) errno = 1; free_secure ((void **) &test_string[0], strlen (test_string[0])); -- cgit v1.2.3