Skip to content

Commit 454f25c

Browse files
committed
[CRT_APITEST] Add a few more tests for _wcsicmp
These show that _wcsicmp does a lowercase comparison.
1 parent 31b091c commit 454f25c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

modules/rostests/apitests/crt/_wcsicmp.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,17 @@ START_TEST(_wcsicmp)
5050
#else
5151
EndSeh((is_reactos() || _winver >= _WIN32_WINNT_VISTA) ? STATUS_SUCCESS : STATUS_ACCESS_VIOLATION);
5252
#endif
53+
54+
ok_eq_int(p_wcsicmp(L"abc", L"ABC"), 0);
55+
ok_eq_int(p_wcsicmp(L"ABC", L"abc"), 0);
56+
ok_eq_int(p_wcsicmp(L"abc", L"abd"), -1);
57+
ok_eq_int(p_wcsicmp(L"abd", L"abc"), 1);
58+
ok_eq_int(p_wcsicmp(L"abcd", L"ABC"), 'd');
59+
ok_eq_int(p_wcsicmp(L"ABC", L"abcd"), -'d');
60+
ok_eq_int(p_wcsicmp(L"ab", L"A "), 'b' - ' ');
61+
ok_eq_int(p_wcsicmp(L"AB", L"a "), 'b' - ' ');
62+
ok_eq_int(p_wcsicmp(L"a ", L"aB"), ' ' - 'b');
63+
64+
/* This shows that _wcsicmp does a lowercase comparison. */
65+
ok_eq_int(p_wcsicmp(L"_", L"a"), '_' - 'a');
5366
}

0 commit comments

Comments
 (0)