Zhenbo Li litimetal@gmail.com wrote:
ret = SHFileOperationA(&shfo); todo_wine ok(ret == 1026 || ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == ERROR_SUCCESS), /* NT4 */ "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", ret);
- todo_wine
- ok(GetLastError() == 0 ||
broken(GetLastError()==ERROR_FILE_NOT_FOUND), /* win 2000 */
"gle = %d\n", GetLastError() );
'ret == ERROR_SUCCESS (0)' case is marked as broken above, so using broken for 'GetLastError() == 0' instead of ERROR_FILE_NOT_FOUND would match that behaviour. Same comment applies for other added tests.
In general I don't think that adding last error tests for SHFileOperation is very useful because 1) this API returns error codes directly 2) according to the tests both returned error codes and set last error values differ in almost every Windows version, so it's very unlikely that there is an app that depends on this.