msvcrt/tests: Add a test for wcsncpy().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1fadcf2409
commit
a1e47a3128
|
@ -4457,6 +4457,17 @@ static void test__mbbtype(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void test_wcsncpy(void)
|
||||
{
|
||||
wchar_t dst[6], *p;
|
||||
|
||||
memset(dst, 0xff, sizeof(dst));
|
||||
p = wcsncpy(dst, L"1234567", 6);
|
||||
ok(p == dst, "Unexpected return value.\n");
|
||||
ok(!memcmp(dst, L"123456", sizeof(dst)), "unexpected buffer %s\n",
|
||||
wine_dbgstr_wn(dst, ARRAY_SIZE(dst)));
|
||||
}
|
||||
|
||||
START_TEST(string)
|
||||
{
|
||||
char mem[100];
|
||||
|
@ -4612,4 +4623,5 @@ START_TEST(string)
|
|||
test___STRINGTOLD();
|
||||
test_SpecialCasing();
|
||||
test__mbbtype();
|
||||
test_wcsncpy();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue