test-ctype: check EOF
The character classifiers are supposed to allow passing EOF to them, a negative value. It isn't part of any character class. Extend the tests to cover that. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
May 1, 2023 at 21:51 UTC
31885f64e96e172cc03506f875fb535172a27c05
1 file changed
+2
t/helper/test-ctype.c
+2
@@ -28,6 +28,8 @@ static int is_in(const char *s, int ch)
28
if (is_in(s, i) != t(i)) \
29
report_error(#t, i); \
30
} \
31
+ if (t(EOF)) \
32
+ report_error(#t, EOF); \
33
}
34
35
#define DIGIT "0123456789"