msvcrt/tests: Use different method to determine non-SBCS locale

Greg Geldorp ggeldorp at vmware.com
Sun Jan 16 15:16:06 CST 2011


I have doubts about the usefulness of the mblen() test. Because of its
inclusion in the test_mbcp() function you'd expect it to depend on the
multibyte code page, but it doesn't, it depends solely on the locale. This
is covered in the comment just before the test, but it still took a while
to sink in when I was working on it. Since there's no setlocale() call,
the locale in use depends on the default locale and is essentially
unpredictable.

This change fixes the test by making sure the result of mblen() can only
be 1. If you agree that the test in its previous/current form is useless,
please let me now and I'll send a new patch.

---
 dlls/msvcrt/tests/string.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-msvcrt-tests-Use-different-method-to-determine-non-S.patch
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20110116/4a47d54c/attachment-0001.bin>


More information about the wine-patches mailing list