diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2022-05-10 21:12:33 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2022-05-10 21:12:33 +0300 |
commit | 16538abf8d1231279133508ba15376145b818518 (patch) | |
tree | e19079645f87163f674faa333044330c37374ea9 /tests/util.c | |
parent | e739c5dccc0faf13cbddacd1950e203305aa4bab (diff) | |
download | foodtools-16538abf8d1231279133508ba15376145b818518.tar.gz foodtools-16538abf8d1231279133508ba15376145b818518.tar.bz2 foodtools-16538abf8d1231279133508ba15376145b818518.zip |
autotools and check testign suite
Diffstat (limited to 'tests/util.c')
-rw-r--r-- | tests/util.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/util.c b/tests/util.c new file mode 100644 index 0000000..6703abf --- /dev/null +++ b/tests/util.c @@ -0,0 +1,15 @@ +/* -*- eval: (outline-minor-mode); outline-regexp: "START_TEST("; -*- */ + +START_TEST(check_trim) +{ + char s1[10] = " test "; + char s2[10] = " test\n "; + char s3[10] = "\ttest\n "; + + trim(s1); trim(s2); trim(s3); + + ck_assert_str_eq(s1, "test"); + ck_assert_str_eq(s2, "test"); + ck_assert_str_eq(s3, "test"); +} +END_TEST |