From 31885f64e96e172cc03506f875fb535172a27c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Mon, 1 May 2023 21:51:57 +0200 Subject: [PATCH] test-ctype: check EOF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- t/helper/test-ctype.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/helper/test-ctype.c b/t/helper/test-ctype.c index b21bd672d9..c8a0363ba2 100644 --- a/t/helper/test-ctype.c +++ b/t/helper/test-ctype.c @@ -28,6 +28,8 @@ static int is_in(const char *s, int ch) if (is_in(s, i) != t(i)) \ report_error(#t, i); \ } \ + if (t(EOF)) \ + report_error(#t, EOF); \ } #define DIGIT "0123456789"