diff options
Diffstat (limited to 'test/mem/memmove_overlap.c')
-rw-r--r-- | test/mem/memmove_overlap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/mem/memmove_overlap.c b/test/mem/memmove_overlap.c new file mode 100644 index 0000000..6e786b5 --- /dev/null +++ b/test/mem/memmove_overlap.c @@ -0,0 +1,13 @@ +#include <mem.h> +#include <stdio.h> +#include <string.h> + +static char buf[] = "hello world"; + +int main(void) { + calt_memmove(buf + 1, buf + 2, 5); + return calt_memcmp(buf, "hllo wworld", + sizeof buf - 1) == 0 + ? 0 + : 1; +} |