Francois Gouget wrote:
So undocumented features should not be tested unless there is a really good reason to do so. Unless you know of a specific application that depends on it, there is no good reason to check whether a buffer is or is not modified when it is too short.
Hi,
I'm the author of the locale test. It has been written mainly to help fixing bug 367 (see http://bugs.winehq.com/show_bug.cgi?id=637) and that's why it is testing undocumented behavior.
Two application like "HTMLKit" or "Font xplorer lite" rely on this weird behavior.
Mehmet
On Wed, 11 Dec 2002, Mehmet YASAR wrote: [...]
I'm the author of the locale test. It has been written mainly to help fixing bug 367 (see http://bugs.winehq.com/show_bug.cgi?id=637) and that's why it is testing undocumented behavior.
Two application like "HTMLKit" or "Font xplorer lite" rely on this weird behavior.
Ah, that's interesting. However, reading the bug it sounds like the problem was with GetLocaleInfoA, not the other functions. That makes sense since that test did not fail on any platform (and thus I did not change it).
So I propose to just add a comment for that specific test, mentioning the two applications and the bug report. Maybe the comment should also mention the ExpressBars library. If anyone has suggestions for a better wording let me know.
Here's the patch (but it conflicts with the one I already sent due to the memset/sizeof changes so I'll send it to wine-patches when the previous one has been committed).
Index: dlls/kernel/tests/locale.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/tests/locale.c,v retrieving revision 1.7 diff -u -r1.7 locale.c --- dlls/kernel/tests/locale.c 27 Nov 2002 20:13:23 -0000 1.7 +++ dlls/kernel/tests/locale.c 12 Dec 2002 00:26:04 -0000 @@ -51,6 +51,9 @@ lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT ); ok (lcid == 0x409, "wrong LCID calculated");
+ /* HTMLKit and "Font xplorer lite" expect GetLocaleInfoA to + * partially fill the buffer even if it is too short. See bug 637. + */ strcpy(Expected, "xxxxx"); memset( buffer, 'x', sizeof (buffer)/sizeof(buffer[0]) ); ret = GetLocaleInfoA(lcid, LOCALE_SDAYNAME1, buffer, 0);