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_wcscat_dynamic_write.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/test_wcscat_dynamic_write.c (limited to 'tests/test_wcscat_dynamic_write.c') diff --git a/tests/test_wcscat_dynamic_write.c b/tests/test_wcscat_dynamic_write.c new file mode 100644 index 0000000..064f018 --- /dev/null +++ b/tests/test_wcscat_dynamic_write.c @@ -0,0 +1,21 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + wchar_t buffer[8] = {0}; + wchar_t src[20]; + int i; + wcscat(buffer, L"α"); + + for (i = 0; i < argc; i++) + src[i] = L'A'; + src[i] = L'\0'; + + CHK_FAIL_START + wcscat(buffer, src); + CHK_FAIL_END + + printf("%ls\n", buffer); + return ret; +} -- cgit v1.3