summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-20 12:44:34 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-20 12:44:34 -0500
commitde17eec4940b2cd1a2b5b0d83a81c76ba50ef8db (patch)
tree84628df8ff0a4e8eea5e1cb43fc30c3c2e2f5dda
parentc2df1f5064e7f70d6e43c4d5e9a4cc5b8b4d617a (diff)
downloaddeheader-de17eec4940b2cd1a2b5b0d83a81c76ba50ef8db.tar.gz
deheader-de17eec4940b2cd1a2b5b0d83a81c76ba50ef8db.tar.bz2
deheader-de17eec4940b2cd1a2b5b0d83a81c76ba50ef8db.tar.xz
deheader-de17eec4940b2cd1a2b5b0d83a81c76ba50ef8db.zip
More tests, mostly in stdio.h.
-rwxr-xr-xdeheader10
-rw-r--r--test/README9
-rw-r--r--test/regress.chk3
3 files changed, 17 insertions, 5 deletions
diff --git a/deheader b/deheader
index 3a91b53..834cc52 100755
--- a/deheader
+++ b/deheader
@@ -117,9 +117,19 @@ requirements = (
(r"fattach()", ["<stropts.h>"]),
(r"fchdir()", ["<unistd.h>"]),
(r"fchmod()", ["<sys/stat,h>"]),
+ (r"fdopen()", ["<stdio.h>"]),
+ (r"fclose()", ["<stdio.h>"]),
+ (r"fdatasync()", ["<unistd.h>"]),
+ (r"fdetach()", ["<stropts.h>"]),
# Header dependencies implies by SuS
(r"<dirent.h>", ["<sys/types.h>"]),
(r"<fcntl.h>", ["<sys/stat.h>", "<sys/types.h>"]),
+ (r"fdopen()", ["<stdio.h>"]),
+ (r"ferror()", ["<stdio.h>"]),
+ (r"feof()", ["<stdio.h>"]),
+ (r"fflush()", ["<stdio.h>"]),
+ (r"ffs()", ["<strings.h>"]),
+ (r"fgetc()", ["<stdio.h>"]),
# Dependencies observed on systems other than the Linux this was
# developed under.
(r"<sys/socket.h>", ["<sys/stat.h>", "<sys/types.h>"]),
diff --git a/test/README b/test/README
index 936785f..2d95305 100644
--- a/test/README
+++ b/test/README
@@ -15,9 +15,9 @@ time.h - asctime() and asctime_r()
assert.h - assert() macro
syslog.h - closelog(), openlog(), setlogmask(), syslog()
rexgexp.h - advance() is tested, compile() is not.
-unistd.h - confstr(), exec*(), fchdir() not tested.
+unistd.h - confstr(), exec*(), fchdir(), fdatasync() not tested.
math.h - cos(), cosh(): these will need <math.h>.
-stdio.h - ctermid() not tested; SuS includes <stdio.h>
+stdio.h - ctermid(), fdopen(), feof(), ferror(), fflush(), fgetc() not tested.
time.h - ctime_r(), difftime(), and daylight are not tested, but ctime() is.
ctype.h - not tested; all the macro defs would be unresolved.
stdio.h - cuserid() not tested; SuS includes <stdio.h>
@@ -29,9 +29,10 @@ dlfcn.h - dlclose(), dlerror(), dlopen(), dlsym() not tested
grp.h - functions not tested, getgrent() depends omn <grp.h>
pwd.h - functions not tested, getpwent() depends omn <pwd.h>
utmpx.h - functions not tested, most depend on <utmpx.h>
-math.h - erf(), erfc(), exp(), expm1(), fabs() not tested.
-stropts.h - fattach() not tested
+math.h - erf(), erfc(), exp(), expm1(), fabs(), floor() not tested.
+stropts.h - fattach(), fdetach() not tested
time.h - FD_* macros are not tested
+strings.h - ffs() not tested.
For other dependencies not tested, see the commented-out lines in deheader's
dependency table.
diff --git a/test/regress.chk b/test/regress.chk
index b411272..b1533f4 100644
--- a/test/regress.chk
+++ b/test/regress.chk
@@ -46,6 +46,7 @@ deheader: ./cfsetispeed.c has requires <termios.h> from cfsetispeed()
deheader: ./cfsetispeed.c includes <termios.h>
deheader: ./sbrk.c includes <unistd.h>
deheader: ./ctime.c includes <time.h>
+deheader: ./fclose.c has requires <stdio.h> from fclose()
deheader: ./fclose.c includes <stdio.h>
deheader: ./alarm.c includes <unistd.h>
deheader: ./cfgetospeed.c has requires <termios.h> from cfgetospeed()
@@ -152,7 +153,7 @@ deheader: ./alarm.c without <unistd.h> succeeded.
deheader: remove <unistd.h> from ./alarm.c
deheader: ./sbrk.c without <unistd.h> succeeded.
deheader: remove <unistd.h> from ./sbrk.c
-deheader: ./fclose.c without <stdio.h> failed (512).
+deheader: in ./fclose.c, retaining required '#include <stdio.h>\n'
deheader: in ./umask.c, retaining required '#include <sys/types.h>\n'
deheader: in ./umask.c, retaining required '#include <sys/stat.h>\n'
deheader: in ./calloc.c, retaining required '#include <stdlib.h>\n'