From 51c05fe7b5d6518bfb8a07ee3ec3c072bb21163e Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Fri, 3 Feb 2023 18:40:59 +0100 Subject: Initial commit --- test/test1.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/test1.c (limited to 'test/test1.c') diff --git a/test/test1.c b/test/test1.c new file mode 100644 index 0000000..777aa5f --- /dev/null +++ b/test/test1.c @@ -0,0 +1,32 @@ +/* See LICENSE file for copyright and license details. */ + +#include +#include + +#include "test.h" + +void +test1(void) +{ + printf("executing test1... "); + asserti(0, strends("alexander", "xander")); + asserti(1, strends("alexander", "dander")); + asserti(1, strends("alexander", "alex")); + asserti(0, strends("alexander", "alexander")); + asserti(1, strends("dwm", "dwmdwm")); + + printf("OK\n"); +} + +void +test2(void) +{ + printf("executing test2... "); + asserti(0, strstarts("alexander", "alex")); + asserti(1, strstarts("alexander", "dalex")); + asserti(1, strstarts("alexander", "xander")); + asserti(0, strstarts("alexander", "alexander")); + asserti(1, strstarts("dwm", "dwmdwm")); + + printf("OK\n"); +} -- cgit v1.2.3