aboutsummaryrefslogtreecommitdiffstats
path: root/memelem.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--memelem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/memelem.c b/memelem.c
index fbd16d7..29d6ed9 100644
--- a/memelem.c
+++ b/memelem.c
@@ -92,6 +92,11 @@ main(void)
assert(!libsimple_memelem("bc123abc123a", 4, "123", 3));
assert(!libsimple_memelem("abc123abc123", 0, "123", 3));
+ assert(!strcmpnul(libsimple_memelem("-a-aa--a", 4, "a-", 2), "a--a"));
+ assert(!strcmpnul(libsimple_memelem("--a--aa----a", 4, "a--", 3), "a----a"));
+ assert(!strcmpnul(libsimple_memelem("---a---aa------a", 4, "a---", 4), "a------a"));
+ assert(!strcmpnul(libsimple_memelem("-------a-------aa--------------a", 4, "a-------", 8), "a--------------a"));
+
return 0;
}