Piotr Caban (@piotr) commented about dlls/msvcrt/tests/time.c:
+{ + __time32_t goodtime = 0; + __time32_t badtime = -1; + char out[26]; + int ret; + + if(!p_ctime32_s) { + win_skip("Skipping _ctime32_s tests\n"); + return; + } + + ret = p_ctime32_s(out, 26, &goodtime); + ok(ret == 0, "expected _ctime32_s to return NULL, got %i\n", ret); + + ret = p_ctime32_s(out, 26, &badtime); + ok(ret == EINVAL, "expected _ctime32_s to return EINVAL, got %i\n", ret); The function should also set errno on error:
```suggestion:-1+0 errno = 0; ret = p_ctime32_s(out, 26, &badtime); ok(ret == EINVAL, "expected _ctime32_s to return EINVAL, got %i\n", ret); ok(errno == EINVAL, "errno = %d\n", errno); ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10785#note_138369