aboutsummaryrefslogtreecommitdiffstats
path: root/unit/ck-test.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-11-13 01:29:29 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-11-13 01:29:29 +0200
commitd015a5e66ac9b92bba4eb5020e7bf2384f65ed25 (patch)
treeb35417c4fb82e320f6d1297f449991c6c3537134 /unit/ck-test.c
parent2638802ccd0d0776ebf1867181d4e3950a147074 (diff)
downloadck-d015a5e66ac9b92bba4eb5020e7bf2384f65ed25.tar.gz
ck-d015a5e66ac9b92bba4eb5020e7bf2384f65ed25.tar.bz2
ck-d015a5e66ac9b92bba4eb5020e7bf2384f65ed25.zip
Homedir finished
Diffstat (limited to 'unit/ck-test.c')
-rw-r--r--unit/ck-test.c8
1 files changed, 4 insertions, 4 deletions
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() {