Commit 5972691e authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cfe5184b
...@@ -491,6 +491,20 @@ static void test__strnicmp(void) ...@@ -491,6 +491,20 @@ static void test__strnicmp(void)
ok(!ret, "got %d.\n", ret); 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) static void test_SpecialCasing(void)
{ {
int i; int i;
...@@ -602,6 +616,7 @@ START_TEST(string) ...@@ -602,6 +616,7 @@ START_TEST(string)
test_mbsspn(); test_mbsspn();
test_wcstok(); test_wcstok();
test__strnicmp(); test__strnicmp();
test_wcsnicmp();
test_SpecialCasing(); test_SpecialCasing();
test__mbbtype_l(); test__mbbtype_l();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment