test-ctype: test isascii
commitd5071be5ed7c2d60fe98e41b46a142f42a36caac
authorRené Scharfe <l.s.r@web.de>
Mon, 13 Feb 2023 21:09:58 +0000 (13 22:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Feb 2023 21:36:05 +0000 (13 13:36 -0800)
treefee35eb93b31a7b3f20b7301a590f7c9e956af6b
parent844ede312b4e988881b6e27e352f469d8ab80b2a
test-ctype: test isascii

Test the character classifier added by c2e9364a06 (cleanup: add
isascii(), 2009-03-07).  It returns 1 for NUL as well, which requires
special treatment, as our string-based tester can't find it with
strcmp(3).  Allow NUL to be given as the first character in a class
specification string.  This has the downside of no longer supporting
the empty string, but that's OK since we are not interested in testing
character classes with no members.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-ctype.c