Skip to content

Commit 31885f6

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d1bd1d commit 31885f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/helper/test-ctype.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ static int is_in(const char *s, int ch)
2828
if (is_in(s, i) != t(i)) \
2929
report_error(#t, i); \
3030
} \
31+
if (t(EOF)) \
32+
report_error(#t, EOF); \
3133
}
3234

3335
#define DIGIT "0123456789"

0 commit comments

Comments
 (0)