summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-11 03:34:38 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-11 03:34:38 -0500
commit85014e16e95d0cda3ef192debd4bc79195ee4551 (patch)
treea6e17aceb1b123a53ad7a811734e164da13cf56a /test
parentf3b344acf997c691dcb4280504bbfaf4686b7d17 (diff)
downloaddeheader-85014e16e95d0cda3ef192debd4bc79195ee4551.tar.gz
deheader-85014e16e95d0cda3ef192debd4bc79195ee4551.tar.bz2
deheader-85014e16e95d0cda3ef192debd4bc79195ee4551.tar.xz
deheader-85014e16e95d0cda3ef192debd4bc79195ee4551.zip
Tests for bcmp(3) and bcopy(3).
Diffstat (limited to 'test')
-rw-r--r--test/bcmp.c15
-rw-r--r--test/bcopy.c15
-rw-r--r--test/regress.chk7
3 files changed, 36 insertions, 1 deletions
diff --git a/test/bcmp.c b/test/bcmp.c
new file mode 100644
index 0000000..1d0923b
--- /dev/null
+++ b/test/bcmp.c
@@ -0,0 +1,15 @@
+/* bcmp(3) needs <string.h> */
+
+/*
+ * Items: bcmp(
+ * Requires: <string.h>
+ * Standardized-By: SuS
+ * Not-Detected-by: gcc-4.4.3 + Linux
+ */
+
+#include <string.h>
+
+main(int arg, char **argv)
+{
+ (void) bcmp("aaa", "bbb", 3);
+}
diff --git a/test/bcopy.c b/test/bcopy.c
new file mode 100644
index 0000000..a2d3f49
--- /dev/null
+++ b/test/bcopy.c
@@ -0,0 +1,15 @@
+/* bcopy(3) needs <string.h> */
+
+/*
+ * Items: bcopy(
+ * Requires: <string.h>
+ * Standardized-By: SuS
+ * Detected-by: gcc-4.4.3 + Linux
+ */
+
+#include <string.h>
+
+main(int arg, char **argv)
+{
+ (void) bcopy(NULL, NULL, 0);
+}
diff --git a/test/regress.chk b/test/regress.chk
index bbfe3ef..a1ea9c7 100644
--- a/test/regress.chk
+++ b/test/regress.chk
@@ -10,6 +10,9 @@ deheader: test/umask.c includes <sys/types.h>
deheader: test/umask.c has requires <sys/stat.h>,<sys/types.h> from umask\s*\(
deheader: test/a64l.c has requires <stdlib.h> from a64l\s*\(
deheader: test/a64l.c includes <stdlib.h>
+deheader: test/bcmp.c has requires <string.h> from bcmp\s*\(
+deheader: test/bcmp.c includes <string.h>
+deheader: test/bcopy.c includes <string.h>
deheader: test/atexit.c includes <stdlib.h>
deheader: test/abs.c includes <stdlib.h>
deheader: test/access.c has requires <unistd.h> from access\s*\(
@@ -40,6 +43,7 @@ deheader: in test/atof.c, retaining required '#include <stdlib.h>\n'
deheader: in test/atoi.c, retaining required '#include <stdlib.h>\n'
deheader: test/asin.c without <math.h> succeeded.
deheader: remove <math.h> from test/asin.c
+deheader: test/bcopy.c without <string.h> failed (512).
deheader: in test/access.c, retaining required '#include <unistd.h>\n'
deheader: in test/a64l.c, retaining required '#include <stdlib.h>\n'
deheader: test/duplicate.c without <stdio.h> succeeded.
@@ -61,9 +65,10 @@ deheader: in test/atan2.c, retaining required '#include <math.h>\n'
deheader: in test/acosh.c, retaining required '#include <math.h>\n'
deheader: test/abort.c without <stdlib.h> succeeded.
deheader: remove <stdlib.h> from test/abort.c
+deheader: in test/bcmp.c, retaining required '#include <string.h>\n'
deheader: test/abs.c without <stdlib.h> succeeded.
deheader: remove <stdlib.h> from test/abs.c
deheader: in test/atan.c, retaining required '#include <math.h>\n'
deheader: test/atexit.c without <stdlib.h> failed (512).
deheader: in test/acos.c, retaining required '#include <math.h>\n'
-deheader: saw 22 files, 23 includes, 8 removed
+deheader: saw 24 files, 25 includes, 8 removed