From 16538abf8d1231279133508ba15376145b818518 Mon Sep 17 00:00:00 2001 From: gramanas Date: Tue, 10 May 2022 21:12:33 +0300 Subject: autotools and check testign suite --- tests/util.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/util.c (limited to 'tests/util.c') 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 -- cgit v1.2.3