summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-09 13:37:56 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-09 13:37:56 -0500
commit0b75e19c023bfb4995172b04ab3641908fbafbb3 (patch)
tree4134a6be37ff5258fd63a98ccb71a7f94322d7e0 /test
parent9b2713b52510743a4a277055c418d29fed5d8ca1 (diff)
downloaddeheader-0b75e19c023bfb4995172b04ab3641908fbafbb3.tar.gz
deheader-0b75e19c023bfb4995172b04ab3641908fbafbb3.tar.bz2
deheader-0b75e19c023bfb4995172b04ab3641908fbafbb3.tar.xz
deheader-0b75e19c023bfb4995172b04ab3641908fbafbb3.zip
Improve the regression tests.
Diffstat (limited to 'test')
-rw-r--r--test/regress.chk9
-rw-r--r--test/umask.c8
2 files changed, 16 insertions, 1 deletions
diff --git a/test/regress.chk b/test/regress.chk
index 4dae4d1..f80d014 100644
--- a/test/regress.chk
+++ b/test/regress.chk
@@ -1,2 +1,9 @@
+deheader: test/string.c requires <string.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/string.c without <string.h> succeeded.
deheader: remove <string.h> from test/string.c
-deheader: saw 2 files, 1 includes, 1 removed
+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
diff --git a/test/umask.c b/test/umask.c
new file mode 100644
index 0000000..ae98c09
--- /dev/null
+++ b/test/umask.c
@@ -0,0 +1,8 @@
+/* this file tests the requirement rules */
+
+#include <sys/stat.h>
+#include <sys/types.h>
+main(int arg, char **argv)
+{
+ umask(777);
+}