diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 2 | ||||
| -rw-r--r-- | tests/test_wmemmove_dynamic_write.c | 14 | ||||
| -rw-r--r-- | tests/test_wmemmove_static_write.c | 14 |
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile index 1c73c7e..ced53f6 100644 --- a/tests/Makefile +++ b/tests/Makefile | |||
| @@ -102,6 +102,8 @@ TARGETS= \ | |||
| 102 | test_vsnprintf_static \ | 102 | test_vsnprintf_static \ |
| 103 | test_vsprintf \ | 103 | test_vsprintf \ |
| 104 | test_write_dynamic \ | 104 | test_write_dynamic \ |
| 105 | test_wmemmove_dynamic_write \ | ||
| 106 | test_wmemmove_static_write \ | ||
| 105 | test_write_static \ | 107 | test_write_static \ |
| 106 | 108 | ||
| 107 | .SILENT: | 109 | .SILENT: |
diff --git a/tests/test_wmemmove_dynamic_write.c b/tests/test_wmemmove_dynamic_write.c new file mode 100644 index 0000000..0c59661 --- /dev/null +++ b/tests/test_wmemmove_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 | wmemmove(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", 2); | ||
| 8 | |||
| 9 | CHK_FAIL_START | ||
| 10 | wmemmove(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", argc); | ||
| 11 | CHK_FAIL_END | ||
| 12 | |||
| 13 | return ret; | ||
| 14 | } | ||
diff --git a/tests/test_wmemmove_static_write.c b/tests/test_wmemmove_static_write.c new file mode 100644 index 0000000..a82d9db --- /dev/null +++ b/tests/test_wmemmove_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 | wmemmove(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", 2); | ||
| 8 | |||
| 9 | CHK_FAIL_START | ||
| 10 | wmemmove(buffer, L"αβγδεζηθικλμνξοπρστυφχψω", 1337); | ||
| 11 | CHK_FAIL_END | ||
| 12 | |||
| 13 | return ret; | ||
| 14 | } | ||
