Add ctype test
Manipulating the character class table in ctype.c by hand is error prone. To ensure that typos are found quickly, add a test program and script. test-ctype checks the output of the character class macros isspace() et. al. by applying them on all possible char values and consulting a list of all characters in the particular class. It doesn't check tolower() and toupper(); this could be added later. The test script t0070-fundamental.sh is created because there is no good place for the ctype test, yet -- except for t0000-basic.sh perhaps, but it doesn't run well on Windows, yet. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c822255cfc
commit
b4285c71bc
15
t/t0070-fundamental.sh
Executable file
15
t/t0070-fundamental.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_description='check that the most basic functions work
|
||||
|
||||
|
||||
Verify wrappers and compatibility functions.
|
||||
'
|
||||
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'character classes (isspace, isalpha etc.)' '
|
||||
test-ctype
|
||||
'
|
||||
|
||||
test_done
|
Reference in New Issue
Block a user