diff options
| author | jvoisin | 2026-04-30 17:50:27 +0200 |
|---|---|---|
| committer | jvoisin | 2026-04-30 17:50:27 +0200 |
| commit | dfdf53df99c8f59e5e3a4296c455041bee96a88d (patch) | |
| tree | 32b8a50c11c708b69874444c4d0969d40d0d7434 /tests/test_wmemcpy_dynamic_read.c | |
| parent | f9239e2c0f0be9856322727887a45333683940a6 (diff) | |
Improve coverage for wmemcpy and wmemmove
Like it's already done for memcpy and memmove. Add tests as well,
to prove that nothing broke.
Diffstat (limited to 'tests/test_wmemcpy_dynamic_read.c')
| -rw-r--r-- | tests/test_wmemcpy_dynamic_read.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_wmemcpy_dynamic_read.c b/tests/test_wmemcpy_dynamic_read.c new file mode 100644 index 0000000..20ba0ad --- /dev/null +++ b/tests/test_wmemcpy_dynamic_read.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <wchar.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | wchar_t buffer[12] = {0}; | ||
| 7 | wmemcpy(buffer, L"αβγδεζηθικ", sizeof(buffer) / sizeof(wchar_t) - 1); | ||
| 8 | printf("%ls\n", buffer); | ||
| 9 | |||
| 10 | CHK_FAIL_START | ||
| 11 | wmemcpy(buffer, L"αβγδεζ", argc); | ||
| 12 | CHK_FAIL_END | ||
| 13 | |||
| 14 | printf("%ls\n", buffer); | ||
| 15 | return ret; | ||
| 16 | } | ||
