[PATCH] ucrtbase/tests: Add a test for wcsnicmp() with limit -1.
Dmitry Timoshkov
dmitry at baikal.ru
Wed Apr 6 03:12:11 CDT 2022
To show that it's valid unlike _strnicmp().
Based on _strnicmp() test.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/ucrtbase/tests/string.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/dlls/ucrtbase/tests/string.c b/dlls/ucrtbase/tests/string.c
index 9446a1e4d5c..806ae08f253 100644
--- a/dlls/ucrtbase/tests/string.c
+++ b/dlls/ucrtbase/tests/string.c
@@ -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();
}
--
2.35.1
More information about the wine-devel
mailing list