diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-12-09 15:05:52 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-12-09 15:05:52 -0500 |
commit | 3f28a5371f014ddca1dd9d283349ae9011c59f3b (patch) | |
tree | 0b622322e046ee8d0e890613df33ddffdd7f159d /test | |
parent | b692513e62cb463ac3bc519e8960f5dfa6068e00 (diff) | |
download | deheader-3f28a5371f014ddca1dd9d283349ae9011c59f3b.tar.gz deheader-3f28a5371f014ddca1dd9d283349ae9011c59f3b.tar.bz2 deheader-3f28a5371f014ddca1dd9d283349ae9011c59f3b.tar.xz deheader-3f28a5371f014ddca1dd9d283349ae9011c59f3b.zip |
Detect duplicated inclusions.
Diffstat (limited to 'test')
-rw-r--r-- | test/duplicate.c | 8 | ||||
-rw-r--r-- | test/noheaders.c | 2 | ||||
-rw-r--r-- | test/regress.chk | 11 |
3 files changed, 18 insertions, 3 deletions
diff --git a/test/duplicate.c b/test/duplicate.c new file mode 100644 index 0000000..5074c78 --- /dev/null +++ b/test/duplicate.c @@ -0,0 +1,8 @@ +/* this file tests detection of duplicate heafers */ + +#include <stdio.h> +#include <stdio.h> + +main(int arg, char **argv) +{ +} diff --git a/test/noheaders.c b/test/noheaders.c index d245179..7655e0c 100644 --- a/test/noheaders.c +++ b/test/noheaders.c @@ -1,4 +1,4 @@ -/* this filre has no headers and needs none */ +/* this file has no headers and needs none */ main(int arg, char **argv) { diff --git a/test/regress.chk b/test/regress.chk index f80d014..02bc982 100644 --- a/test/regress.chk +++ b/test/regress.chk @@ -1,9 +1,16 @@ deheader: test/string.c requires <string.h> +deheader: test/duplicate.c requires <stdio.h> +deheader: test/duplicate.c requires <stdio.h> +deheader: test/duplicate.c has more than one inclusion of <stdio.h> deheader: test/umask.c requires <sys/stat.h> deheader: test/umask.c requires <sys/types.h> -test/umask.c has requires <sys/stat.h>|<sys/types.h> from umask +deheader: test/umask.c has requires <sys/stat.h>|<sys/types.h> from umask deheader: test/string.c without <string.h> succeeded. deheader: remove <string.h> from test/string.c deheader: in test/umask.c, retaining required '#include <sys/types.h>\n' deheader: in test/umask.c, retaining required '#include <sys/stat.h>\n' -deheader: saw 3 files, 3 includes, 1 removed +deheader: test/duplicate.c without <stdio.h> succeeded. +deheader: test/duplicate.c without <stdio.h> succeeded. +deheader: remove <stdio.h> from test/duplicate.c +deheader: remove <stdio.h> from test/duplicate.c +deheader: saw 4 files, 5 includes, 3 removed |