Piotr Caban : msvcp140: Fix _Winerror_message test failures.
Module: wine Branch: master Commit: afc0d31d3e4a5861fa20cf2e82aec92c8cee14f2 URL: https://source.winehq.org/git/wine.git/?a=commit;h=afc0d31d3e4a5861fa20cf2e8... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Nov 19 13:26:18 2021 +0100 msvcp140: Fix _Winerror_message test failures. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51307 Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp140/tests/msvcp140.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c index 8a3771842a0..31c8cfc4f59 100644 --- a/dlls/msvcp140/tests/msvcp140.c +++ b/dlls/msvcp140/tests/msvcp140.c @@ -1254,8 +1254,10 @@ static void test__Winerror_message(void) memset(buf, 'a', sizeof(buf)); ret = p__Winerror_message(0, buf, sizeof(buf)); - ok(ret == ret_fm, "ret = %u, expected %u\n", ret, ret_fm); - ok(!strcmp(buf, buf_fm), "buf = %s, expected %s\n", buf, buf_fm); + ok(ret == ret_fm || (ret_fm > 2 && buf_fm[ret_fm - 1] == '\n' && + buf_fm[ret_fm - 2] == '\r' && ret + 2 == ret_fm), + "ret = %u, expected %u\n", ret, ret_fm); + ok(!strncmp(buf, buf_fm, ret), "buf = %s, expected %s\n", buf, buf_fm); memset(buf, 'a', sizeof(buf)); ret = p__Winerror_message(0, buf, 2);
participants (1)
-
Alexandre Julliard