From fa40365faea6b87288504f0d8ad39dab8ff302b4 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 13 Apr 2023 23:44:52 +0200 Subject: Add tests for strcat and strcpy --- tests/test_strcpy_static_write.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/test_strcpy_static_write.c (limited to 'tests/test_strcpy_static_write.c') diff --git a/tests/test_strcpy_static_write.c b/tests/test_strcpy_static_write.c new file mode 100644 index 0000000..a3e8100 --- /dev/null +++ b/tests/test_strcpy_static_write.c @@ -0,0 +1,16 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + char buffer[8] = {0}; + strcpy(buffer, "1234567"); + puts(buffer); + + CHK_FAIL_START + strcpy(buffer, "1234567890"); + CHK_FAIL_END + + puts(buffer); + return ret; +} -- cgit v1.3