[PATCH 1/5] lz32/tests: Test more last errors set by
LZOpenFile[AW].
Vitaliy Margolen
wine-devel at kievinfo.com
Thu Oct 5 19:35:25 CDT 2006
Saulius Krasuckas wrote:
> (Headers in this series of patches was slightly edited by hand due to lack
> of internet connection and newer git version. Don't be surprised for
> inconsistencies and just drop if that was the case)
>
> ---
>
> dlls/lz32/tests/lzexpand_main.c | 76 ++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 74 insertions(+), 2 deletions(-)
>
> 484c0e401dc09dd89fffb55da7f34599638bb1cd
> diff --git a/dlls/lz32/tests/lzexpand_main.c b/dlls/lz32/tests/lzexpand_main.c
> index eead144..17c2757 100644
> --- a/dlls/lz32/tests/lzexpand_main.c
> +++ b/dlls/lz32/tests/lzexpand_main.c
> @@ -131,6 +131,7 @@ static void test_LZOpenFileA_existing_co
> memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME);
> memset(&test, 0xA5, sizeof(test));
> full_file_path_name_in_a_CWD(filename_, expected, FALSE);
> + SetLastError(0xfaceabee);
Please use the common accepted and agreed on 0xdeadbeef. As it is used
in all the other tests.
> /* d, using underscore-terminated file name. */
> file = LZOpenFileA(_terminated, &test, OF_EXIST);
> ok(file >= 0, "LZOpenFileA failed on switching to a compressed file name\n");
> + ok(GetLastError() == ERROR_SUCCESS || GetLastError() == ERROR_BAD_PATHNAME,
> + "GetLastError() returns %ld\n", GetLastError());
This doesn't look right. It either fails or it doesn't. You can't have
both. Or this test is nor correct and should be removed.
Vitaliy
More information about the wine-devel
mailing list