diff options
| -rw-r--r-- | tests/Makefile | 2 | ||||
| -rw-r--r-- | tests/test_wmemcpy_dynamic_write.c | 14 | ||||
| -rw-r--r-- | tests/test_wmemcpy_static_write.c | 14 |
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile index ced53f6..8f17906 100644 --- a/tests/Makefile +++ b/tests/Makefile | |||
| @@ -104,6 +104,8 @@ TARGETS= \ | |||
| 104 | test_write_dynamic \ | 104 | test_write_dynamic \ |
| 105 | test_wmemmove_dynamic_write \ | 105 | test_wmemmove_dynamic_write \ |
| 106 | test_wmemmove_static_write \ | 106 | test_wmemmove_static_write \ |
| 107 | test_wmemcpy_dynamic_write \ | ||
| 108 | test_wmemcpy_static_write \ | ||
| 107 | test_write_static \ | 109 | test_write_static \ |
| 108 | 110 | ||
| 109 | .SILENT: | 111 | .SILENT: |
diff --git a/tests/test_wmemcpy_dynamic_write.c b/tests/test_wmemcpy_dynamic_write.c new file mode 100644 index 0000000..fcccca8 --- /dev/null +++ b/tests/test_wmemcpy_dynamic_write.c | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <wchar.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | wchar_t buffer[2] = {0}; | ||
| 7 | wmemcpy(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", 2); | ||
| 8 | |||
| 9 | CHK_FAIL_START | ||
| 10 | wmemcpy(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", argc); | ||
| 11 | CHK_FAIL_END | ||
| 12 | |||
| 13 | return ret; | ||
| 14 | } | ||
diff --git a/tests/test_wmemcpy_static_write.c b/tests/test_wmemcpy_static_write.c new file mode 100644 index 0000000..81bcdfa --- /dev/null +++ b/tests/test_wmemcpy_static_write.c | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <wchar.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | wchar_t buffer[2] = {0}; | ||
| 7 | wmemcpy(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", 2); | ||
| 8 | |||
| 9 | CHK_FAIL_START | ||
| 10 | wmemcpy(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", 1337); | ||
| 11 | CHK_FAIL_END | ||
| 12 | |||
| 13 | return ret; | ||
| 14 | } | ||
