From 8702ce8bbd4d1435cc81fa8fcd7f5309d3c7b003 Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Tue, 18 Sep 2018 19:18:01 +0300 Subject: VC and secret dir are now stored with absolute path --- unit/ck-test.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'unit/ck-test.c') diff --git a/unit/ck-test.c b/unit/ck-test.c index 01156f1..9c18dfb 100644 --- a/unit/ck-test.c +++ b/unit/ck-test.c @@ -1,12 +1,25 @@ +#include +#include +#include + #include "cklist.h" -#include "stdio.h" #define CK_UNIT_TESTS \ X(ck_list_init, "Initialize ck list") \ X(ck_list_add, "Add elements to ck list") void ck_list_init() { - printf("Test1\n"); + cklist *ckl1 = list_make_new(); + cklist *ckl2 = list_make_and_add("first"); + list_add(ckl2, "second"); + list_add(ckl1, "first"); + list_add(ckl1, "second"); + assert(strcmp(list_get_at(ckl1, 0), + list_get_at(ckl2, 0)) == 0); + assert(strcmp(list_get_at(ckl1, 1), + list_get_at(ckl2, 1)) == 0); + list_free(ckl1); + list_free(ckl2); } void ck_list_add() { -- cgit v1.2.3