summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2023-05-01 21:51:57 +0200
committerJunio C Hamano <gitster@pobox.com>2023-05-02 09:25:54 -0700
commit31885f64e96e172cc03506f875fb535172a27c05 (patch)
tree4f1eaa421ab995962cd34b5462ee492ffa37d72a
parent0d1bd1dfb37ef25e1911777c94129fc769ffec38 (diff)
downloadgit-31885f64e96e172cc03506f875fb535172a27c05.tar.gz
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>
-rw-r--r--t/helper/test-ctype.c2
1 files changed, 2 insertions, 0 deletions
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"