Re: RFC: Patch to change what sets the is_win9x in riched20/tests
On 2/22/11 12:42 AM, Paul Vriens wrote: On 02/22/2011 01:21 AM, James McKenzie wrote: All: Upon examining other test code that creates a variable called is_win9x, I realized that using get_version and comparing it to a fixed value may not be best for the riched20 tests and have attached a proposed change to how this variable is set. It uses a called function, lstrcmpW and if it does not exist, the variable is set to a false value. This change has been tested on the testbot for Windows95/98/98SE/2K/2K3/XP/XP_64/Vista/Vista64/Win7/Win7_64 and no discrepancies were found. Win9x tests are no longer run with winetest. I also see that Austin sent some 9x cleanup patches. That said, I think the best way is to get rid of all the win9x 'hacks' in editor.c and rely on the fact that we have NT4+. Paul: While that is true, I thought the consensus was that testing would still be available for Window9X/ME. There are users (like me) that are running Windows9x/ME programs and don't want to loose the ability to run them under Wine. This function may not exist in Windows versions after Windows2K either, that is why I proposed changing this from a version check to actually checking for the called function. And lastly, I agree with adding tests to specifically check what happens in the riched20.dll for UNICODE calls. James McKenzie
Re: RFC: Patch to change what sets the is_win9x in riched20/tests
On 02/22/2011 01:21 AM, James McKenzie wrote: All: Upon examining other test code that creates a variable called is_win9x, I realized that using get_version and comparing it to a fixed value may not be best for the riched20 tests and have attached a proposed change to how this variable is set. It uses a called function, lstrcmpW and if it does not exist, the variable is set to a false value. This change has been tested on the testbot for Windows95/98/98SE/2K/2K3/XP/XP_64/Vista/Vista64/Win7/Win7_64 and no discrepancies were found. Win9x tests are no longer run with winetest. I also see that Austin sent some 9x cleanup patches. That said, I think the best way is to get rid of all the win9x 'hacks' in editor.c and rely on the fact that we have NT4+. -- Cheers, Paul.
RFC: Patch to change what sets the is_win9x in riched20/tests
All: Upon examining other test code that creates a variable called is_win9x, I realized that using get_version and comparing it to a fixed value may not be best for the riched20 tests and have attached a proposed change to how this variable is set. It uses a called function, lstrcmpW and if it does not exist, the variable is set to a false value. This change has been tested on the testbot for Windows95/98/98SE/2K/2K3/XP/XP_64/Vista/Vista64/Win7/Win7_64 and no discrepancies were found. Comments on this patch are appreciated. I would like to submit this for inclusion into the Wine code base on Friday. James McKenzie >From b9d828c5cbbcfc53bdb04afad8aca27bbfea1f11 Mon Sep 17 00:00:00 2001 From: James McKenzie Date: Fri, 18 Feb 2011 19:49:51 -0700 Subject: richedit/test. Modify is_win9x determination to use actual called UNICODE function vice testing get_version. --- dlls/riched20/tests/editor.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index a91d984..2dab92b 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -7101,7 +7101,8 @@ START_TEST( editor ) hmoduleRichEdit = LoadLibrary("RICHED20.DLL"); ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); - is_win9x = GetVersion() & 0x8000; + ret = lstrcmpW(NULL, NULL); + is_win9x = !ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED; test_WM_CHAR(); test_EM_FINDTEXT(); -- 1.7.3.5