Piotr Caban (@piotr) commented about dlls/msvcrt/tests/file.c:
- ok(fd > 0, "fileno() returned %d\n", fd);
- errno = 0xdeadbeef;
- ch = '#';
- ret = fread(&ch, 1, 1, new);
- todo_wine
- ok(ret == 1, "fread() returned %d\n", ret);
- todo_wine
- ok(errno == 0xdeadbeef, "errno = %d\n", errno);
- ok(ch == '2', "Unexpected char\n");
- /* invalid file name */
- new = freopen("_:", "rb", file);
- ok(new == NULL, "Shouldn't be able to reopen FILE\n");
- /* don't close file, it's invalid by now */
The commit message needs updating. Since the patch adds some questionable code that is removed in next patch maybe it's better to merge patches 2 and 3.
I think it's better to call fclose and check that it fails instead of adding the comment: ```suggestion:-0+0 ok(fclose(file) == EOF, "fclose(file) succeeded\n"); ```