diff options
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 |