ucrtbase/tests: Add a test for wcsnicmp() with limit -1.

To show that it's valid unlike _strnicmp().
Based on _strnicmp() test.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2022-04-06 11:12:11 +03:00 committed by Alexandre Julliard
parent cfe5184b26
commit 5972691e08
1 changed files with 15 additions and 0 deletions

View File

@ -491,6 +491,20 @@ static void test__strnicmp(void)
ok(!ret, "got %d.\n", ret);
}
static void test_wcsnicmp(void)
{
static const wchar_t str1[] = L"TEST";
static const wchar_t str2[] = L"test";
int ret;
errno = 0xdeadbeef;
ret = wcsnicmp(str1, str2, -1);
ok(!ret, "got %d.\n", ret);
ret = wcsnicmp(str1, str2, 0x7fffffff);
ok(!ret, "got %d.\n", ret);
}
static void test_SpecialCasing(void)
{
int i;
@ -602,6 +616,7 @@ START_TEST(string)
test_mbsspn();
test_wcstok();
test__strnicmp();
test_wcsnicmp();
test_SpecialCasing();
test__mbbtype_l();
}