[PATCH] ntdll: Support only ASCII digits in iswdigit implementation.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/ntdll/tests/string.c | 29 +++++++++++++++++++++++++++++ dlls/ntdll/wcstring.c | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-)
Jacek Caban <jacek(a)codeweavers.com> writes:
@@ -1455,6 +1459,30 @@ static void test__strnicmp(void) ok(!ret, "_strnicmp returned %d\n", ret); }
+static void test_iswdigit(void) +{ + static const struct { + WCHAR c; + int r; + } tests[] = { + { '0', C1_DIGIT }, + { '9', C1_DIGIT }, + { 'a', 0 }, + { 0xff16, 0 }, + { 0x0660, 0 }, + { 0x0660, 0 }, + { 0x0660, 0 },
Did you mean to try different values here? It would be interesting to test if the other isw* functions are also limited to ASCII. -- Alexandre Julliard julliard(a)winehq.org
On 11/11/19 7:54 PM, Alexandre Julliard wrote:
Jacek Caban <jacek(a)codeweavers.com> writes:
@@ -1455,6 +1459,30 @@ static void test__strnicmp(void) ok(!ret, "_strnicmp returned %d\n", ret); }
+static void test_iswdigit(void) +{ + static const struct { + WCHAR c; + int r; + } tests[] = { + { '0', C1_DIGIT }, + { '9', C1_DIGIT }, + { 'a', 0 }, + { 0xff16, 0 }, + { 0x0660, 0 }, + { 0x0660, 0 }, + { 0x0660, 0 }, Did you mean to try different values here?
Oh, good catch, sorry about that. I really need vacations...
It would be interesting to test if the other isw* functions are also limited to ASCII.
Sure, I will resend later with more tests. Thanks, Jacek
participants (2)
-
Alexandre Julliard -
Jacek Caban