From aceef734bdfe4f68e2227fc9ac636aae8235fa12 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 13 Apr 2023 22:46:49 +0200 Subject: Add tests for memmove --- tests/test_memmove_static_read.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/test_memmove_static_read.c (limited to 'tests/test_memmove_static_read.c') diff --git a/tests/test_memmove_static_read.c b/tests/test_memmove_static_read.c new file mode 100644 index 0000000..fb128a6 --- /dev/null +++ b/tests/test_memmove_static_read.c @@ -0,0 +1,16 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + char buffer[8] = {0}; + memmove(buffer, "123456", 4); + puts(buffer); + + CHK_FAIL_START + memmove(buffer, "123456", sizeof(buffer)); + CHK_FAIL_END + + puts(buffer); + return ret; +} -- cgit v1.3