[PATCH 1/3] ucrtbase/tests: Test what iswctype considers a blank character.
Jeff Smith
whydoubt at gmail.com
Wed Jan 1 01:46:14 CST 2020
Signed-off-by: Jeff Smith <whydoubt at gmail.com>
---
dlls/ucrtbase/tests/misc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c
index f637997a0d..6b5977c4d8 100644
--- a/dlls/ucrtbase/tests/misc.c
+++ b/dlls/ucrtbase/tests/misc.c
@@ -154,6 +154,7 @@ static MSVCRT_lldiv_t* (CDECL *p_lldiv)(MSVCRT_lldiv_t*,LONGLONG,LONGLONG);
static int (CDECL *p__isctype)(int,int);
static int (CDECL *p_isblank)(int);
static int (CDECL *p__isblank_l)(int,_locale_t);
+static int (CDECL *p_iswctype)(int,int);
static int (CDECL *p__iswctype_l)(int,int,_locale_t);
static int (CDECL *p_iswblank)(int);
static int (CDECL *p__iswblank_l)(wint_t,_locale_t);
@@ -531,6 +532,7 @@ static BOOL init(void)
p__isctype = (void*)GetProcAddress(module, "_isctype");
p_isblank = (void*)GetProcAddress(module, "isblank");
p__isblank_l = (void*)GetProcAddress(module, "_isblank_l");
+ p_iswctype = (void*)GetProcAddress(module, "iswctype");
p__iswctype_l = (void*)GetProcAddress(module, "_iswctype_l");
p_iswblank = (void*)GetProcAddress(module, "iswblank");
p__iswblank_l = (void*)GetProcAddress(module, "_iswblank_l");
@@ -646,14 +648,18 @@ static void test_isblank(void)
for(c = 0; c <= 0xffff; c++) {
if(c == '\t' || c == ' ' || c == 0x3000 || c == 0xfeff) {
- if(c == '\t')
+ if(c == '\t') {
+ todo_wine ok(!p_iswctype(c, _BLANK), "tab shouldn't be blank\n", c);
todo_wine ok(!p__iswctype_l(c, _BLANK, NULL), "tab shouldn't be blank\n");
- else
+ } else {
+ ok(p_iswctype(c, _BLANK), "%d should be blank\n", c);
ok(p__iswctype_l(c, _BLANK, NULL), "%d should be blank\n", c);
+ }
ok(p_iswblank(c), "%d should be blank\n", c);
ok(p__iswblank_l(c, NULL), "%d should be blank\n", c);
} else {
todo_wine_if(c == 0xa0) {
+ ok(!p_iswctype(c, _BLANK), "%d shouldn't be blank\n", c);
ok(!p__iswctype_l(c, _BLANK, NULL), "%d shouldn't be blank\n", c);
ok(!p_iswblank(c), "%d shouldn't be blank\n", c);
ok(!p__iswblank_l(c, NULL), "%d shouldn't be blank\n", c);
--
2.23.0
More information about the wine-devel
mailing list