aboutsummaryrefslogtreecommitdiffstats
path: root/strtolower.c
diff options
context:
space:
mode:
Diffstat (limited to 'strtolower.c')
-rw-r--r--strtolower.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/strtolower.c b/strtolower.c
index 34006d7..7f72eb0 100644
--- a/strtolower.c
+++ b/strtolower.c
@@ -12,6 +12,18 @@ extern inline char *libsimple_strtolower(char *, const char *);
int
main(void)
{
+ char buf[100];
+
+ stpcpy(buf, "ABCDEabcde12345");
+ assert(!strcmpnul(libsimple_strtolower(&buf[3], &buf[0]), "abcdeabcde12345"));
+ assert(!strcmp(buf, "ABCabcdeabcde12345"));
+ stpcpy(buf, "ABCDEabcde12345");
+ assert(!strcmpnul(libsimple_strtolower(&buf[0], &buf[3]), "deabcde12345"));
+ assert(!strcmp(buf, "deabcde12345"));
+ stpcpy(buf, "ABCDEabcde12345");
+ assert(!strcmpnul(libsimple_strtolower(&buf[0], &buf[0]), "abcdeabcde12345"));
+ assert(!strcmp(buf, "abcdeabcde12345"));
+
return 0;
}