From 3f28a5371f014ddca1dd9d283349ae9011c59f3b Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 9 Dec 2010 15:05:52 -0500 Subject: Detect duplicated inclusions. --- test/duplicate.c | 8 ++++++++ test/noheaders.c | 2 +- test/regress.chk | 11 +++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 test/duplicate.c (limited to 'test') 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 +#include + +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 +deheader: test/duplicate.c requires +deheader: test/duplicate.c requires +deheader: test/duplicate.c has more than one inclusion of deheader: test/umask.c requires deheader: test/umask.c requires -test/umask.c has requires | from umask +deheader: test/umask.c has requires | from umask deheader: test/string.c without succeeded. deheader: remove from test/string.c deheader: in test/umask.c, retaining required '#include \n' deheader: in test/umask.c, retaining required '#include \n' -deheader: saw 3 files, 3 includes, 1 removed +deheader: test/duplicate.c without succeeded. +deheader: test/duplicate.c without succeeded. +deheader: remove from test/duplicate.c +deheader: remove from test/duplicate.c +deheader: saw 4 files, 5 includes, 3 removed -- cgit v1.2.3-70-g09d2