From fe3e4269959ea7534722aa2664a3cac69d9109cf Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 31 Oct 2025 15:18:10 +0100 Subject: Add a testsuite Co-Authored-By: q66 --- tests/test_bcopy_static_read.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/test_bcopy_static_read.c (limited to 'tests/test_bcopy_static_read.c') diff --git a/tests/test_bcopy_static_read.c b/tests/test_bcopy_static_read.c new file mode 100644 index 0000000..e7a3c74 --- /dev/null +++ b/tests/test_bcopy_static_read.c @@ -0,0 +1,18 @@ +#define _GNU_SOURCE + +#include "common.h" + +#include + +int main(int argc, char** argv) { + char buffer[8] = {0}; + bcopy("123456", buffer, 4); + puts(buffer); + + CHK_FAIL_START + bcopy("123456", buffer, sizeof(buffer)); + CHK_FAIL_END + + puts(buffer); + return ret; +} -- cgit v1.3