aboutsummaryrefslogtreecommitdiffstats
path: root/memmem.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-10-21 20:12:31 +0200
committerMattias Andrée <maandree@kth.se>2018-10-21 20:12:31 +0200
commit2215a474e340c3f8f58efe35fc96d62693eacef7 (patch)
tree87505305fb28e285b02082f07cdb2760b53ff01d /memmem.c
parentAdd memcasechr (diff)
downloadlibsimple-2215a474e340c3f8f58efe35fc96d62693eacef7.tar.gz
libsimple-2215a474e340c3f8f58efe35fc96d62693eacef7.tar.bz2
libsimple-2215a474e340c3f8f58efe35fc96d62693eacef7.tar.xz
Add memcase{cmp,ends,starts,eq} and mem[r]casemem
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'memmem.c')
-rw-r--r--memmem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/memmem.c b/memmem.c
index dda13c8..2cee286 100644
--- a/memmem.c
+++ b/memmem.c
@@ -49,6 +49,9 @@ main(void)
assert(!strcmpnul(libsimple_memmem("abc", 3, "abc", 3), "abc"));
assert(!libsimple_memmem("abc", 3, "abc", 4));
assert(!strcmpnul(libsimple_memmem("abcabc", 6, "bc", 2), "bcabc"));
+ assert(!strcmpnul(libsimple_memmem("ABCABC", 6, "BC", 2), "BCABC"));
+ assert(!libsimple_memmem("ABCDEF", 6, "bc", 2));
+ assert(!libsimple_memmem("abcdef", 6, "BC", 2));
return 0;
}