author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sat, 17 Jan 2009 15:50:13 +0000 (16:50 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 18 Jan 2009 02:30:23 +0000 (18:30 -0800) | ||
commit | b4285c71bcc43c4cc9939b8d170aaf8ddb25f09f | |
tree | 6c63596853c57aca828ebbf0a71ed4a5047bb6d5 | tree | snapshot |
parent | c822255cfc1ac83daeeeee1647e3c775450c830c | commit | diff |
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>
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>
Makefile | diff | blob | history | |
t/t0070-fundamental.sh | [new file with mode: 0755] | blob |
test-ctype.c | [new file with mode: 0644] | blob |