From 3b5619a8f41be2e59d542993b75574ecee5dd49a Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Wed, 19 Feb 2020 23:21:33 +0900 Subject: [PATCH] user32/tests: Add wsprintfA %C conversion tests. Signed-off-by: Akihiro Sagawa Signed-off-by: Alexandre Julliard --- dlls/user32/tests/wsprintf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/user32/tests/wsprintf.c b/dlls/user32/tests/wsprintf.c index 3aae012cec2..84dc0eb39b9 100644 --- a/dlls/user32/tests/wsprintf.c +++ b/dlls/user32/tests/wsprintf.c @@ -70,6 +70,9 @@ static void wsprintfATest(void) { fffeW, "%.2S", "?", 1 }, { wineW, "%.2S", "??", 2 }, { star, "%.1s", partial, 1 }, + { (void *)0x2606, "%2C", star, 2 }, + { (void *)0xfffd, "%C", "?", 1 }, + { (void *)0xe199, "%2c", " \x99", 2 }, }; CPINFO cpinfo; unsigned int i; @@ -108,10 +111,12 @@ static void wsprintfATest(void) memset(buf, 0x11, sizeof(buf)); rc = wsprintfA(buf, testcase[i].fmt, testcase[i].input); + todo_wine_if( i == 7 ) ok(rc == testcase[i].rc, "%u: expected %d, got %d\n", i, testcase[i].rc, rc); + todo_wine_if( i == 7 || i == 8 || i == 9 ) ok(!strcmp(buf, testcase[i].str), "%u: expected %s, got %s\n", i, wine_dbgstr_a(testcase[i].str), wine_dbgstr_an(buf, rc));