user32/tests: Add wsprintfA %C conversion tests.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Akihiro Sagawa 2020-02-19 23:21:33 +09:00 committed by Alexandre Julliard
parent 92014581b6
commit 3b5619a8f4
1 changed files with 5 additions and 0 deletions

View File

@ -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));