diff options
| author | jvoisin | 2023-08-21 00:43:30 +0200 |
|---|---|---|
| committer | jvoisin | 2023-08-21 00:43:30 +0200 |
| commit | d9feee06053d1f3c006de00b00dd5feb54ca75e5 (patch) | |
| tree | 6692455e366756429536cb4250db75400ea94fcd /tests/test_mbsrtowcs_static.c | |
| parent | 81527127a9ea5e7db973329b59a5ef7234b05d26 (diff) | |
Add tests for fgetws and mbsrtowcs
Diffstat (limited to 'tests/test_mbsrtowcs_static.c')
| -rw-r--r-- | tests/test_mbsrtowcs_static.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_mbsrtowcs_static.c b/tests/test_mbsrtowcs_static.c new file mode 100644 index 0000000..896329a --- /dev/null +++ b/tests/test_mbsrtowcs_static.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #define _GNU_SOURCE | ||
| 4 | #include <wchar.h> | ||
| 5 | |||
| 6 | int main(int argc, char** argv) { | ||
| 7 | wchar_t dest[3]; | ||
| 8 | const char* src = "abcdefghijklmnopq"; | ||
| 9 | mbstate_t ps; | ||
| 10 | |||
| 11 | CHK_FAIL_START | ||
| 12 | mbsrtowcs(dest, &src, 12, &ps); | ||
| 13 | CHK_FAIL_END | ||
| 14 | |||
| 15 | return ret; | ||
| 16 | } | ||
