From e7c86620bb0c0f8b868d3e4c8dcdebeeffb99631 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 4 May 2026 17:02:12 +0200 Subject: Add a handful of tests --- tests/test_wcsncpy_dynamic_write.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/test_wcsncpy_dynamic_write.c (limited to 'tests/test_wcsncpy_dynamic_write.c') diff --git a/tests/test_wcsncpy_dynamic_write.c b/tests/test_wcsncpy_dynamic_write.c new file mode 100644 index 0000000..3078c0e --- /dev/null +++ b/tests/test_wcsncpy_dynamic_write.c @@ -0,0 +1,16 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + wchar_t buffer[8] = {0}; + wcsncpy(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", 1); + printf("%ls\n", buffer); + + CHK_FAIL_START + wcsncpy(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", argc + 1336); + CHK_FAIL_END + + printf("%ls\n", buffer); + return ret; +} -- cgit v1.3