From d015a5e66ac9b92bba4eb5020e7bf2384f65ed25 Mon Sep 17 00:00:00 2001 From: gramanas Date: Tue, 13 Nov 2018 01:29:29 +0200 Subject: Homedir finished --- unit/ck-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'unit/ck-test.c') diff --git a/unit/ck-test.c b/unit/ck-test.c index 8d8ee08..36b23d8 100644 --- a/unit/ck-test.c +++ b/unit/ck-test.c @@ -49,12 +49,12 @@ void ck_str_utils_test() { /* getenv("HOME") -> /home/user */ char home[STR_S] = "/home/user"; char testpath[STR_S] = "/home/user/file"; - assert(swap_home_with_tilde(str, testpath, home) == 0); + assert(swap_home_with_tilde(str, testpath, home)); assert(strcmp(str, "~/file") == 0); - assert(swap_tilde_with_home(str2, str, home) == 0); + assert(swap_tilde_with_home(str2, str, home)); assert(strcmp(str2, testpath) == 0); - assert(swap_home_with_tilde(str, "/not/starting/with/home", home)); - assert(swap_tilde_with_home(str2, "/not/starting/with/tilde", home)); + assert(swap_home_with_tilde(str, "/not/starting/with/home", home) == NULL); + assert(swap_tilde_with_home(str2, "/not/starting/with/tilde", home) == NULL); } int main() { -- cgit v1.2.3