From: Hugh McMaster Subject: [PATCH] dlls/msvcrt/tests: Add tests for _vsnwprintf Message-Id: Date: Sun, 21 Dec 2014 21:44:57 +1100 This patch adds tests for _vsnwprintf(NULL, 0, fmt, args) and _vsnwprintf(buffer, 0, fmt, args). The tests were verified on the testbot here: http://testbot.winehq.org/JobDetails.pl?Key=10847 From f8d84a17485c379b6deadbf63f8f184d552a63dd Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Sun, 21 Dec 2014 21:27:09 +1100 Subject: [PATCH] dlls/msvcrt/tests: Add tests for _vsnwprintf --- dlls/msvcrt/tests/printf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c index 829b2e0..c5d605c 100644 --- a/dlls/msvcrt/tests/printf.c +++ b/dlls/msvcrt/tests/printf.c @@ -1127,6 +1127,13 @@ static void test_vsnwprintf(void) ok( ret == 11, "got %d expected 11\n", ret ); WideCharToMultiByte( CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL ); ok( !strcmp(buf, "onetwothree"), "got %s expected 'onetwothree'\n", buf ); + + ret = _vsnwprintf_wrapper( NULL, 0, format, one, two, three ); + ok( ret == 11 || broken(ret == -1 /* Win2k */), "got %d, expected 11\n", ret ); + + ret = _vsnwprintf_wrapper( str, 0, format, one, two, three ); + ok( ret == -1, "got %d, expected -1\n", ret ); + } static int __cdecl vswprintf_wrapper(wchar_t *str, const wchar_t *format, ...) -- 1.9.1