summaryrefslogtreecommitdiffstats
path: root/usr.bin/comm
diff options
context:
space:
mode:
authorjmmv <jmmv@FreeBSD.org>2014-04-27 01:15:10 +0000
committerjmmv <jmmv@FreeBSD.org>2014-04-27 01:15:10 +0000
commit1e4589b921fdaa1b1d2fc6b6ed016f1e0a01cb8f (patch)
tree94c86cf13dedabad5bdc68f6f227b843a5161343 /usr.bin/comm
parent5b12da65bf9d40526ac9ca480d639bad3cd39cf6 (diff)
downloadFreeBSD-src-1e4589b921fdaa1b1d2fc6b6ed016f1e0a01cb8f.zip
FreeBSD-src-1e4589b921fdaa1b1d2fc6b6ed016f1e0a01cb8f.tar.gz
MFC various moves of tools/regressions/ tests to the new infrastructure.
- r263220 Migrate tools/regression/sbin/ to the new tests layout. - r263222 Add Makefile missed in r263220. - r263226 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout. - r263227 Migrate most of tools/regression/usr.bin/ to the new tests layout. - r263345 Expand tabs that sneaked in into spaces. - r263346 Migrate tools/regression/usr.bin/make/ to the new tests layout. - r263348 Add Makefiles missed in r263346. - r263351 Migrate tools/regression/usr.bin/pkill/ to the new tests layout. - r263388 Mark multi_test as requiring /usr/share/dict/words. - r263814 Fix path to the run.pl script to let these tests run. - r264742 Prevent building tests when bootstrapping make. This is 'make tinderbox' clean.
Diffstat (limited to 'usr.bin/comm')
-rw-r--r--usr.bin/comm/Makefile6
-rw-r--r--usr.bin/comm/tests/Makefile19
-rw-r--r--usr.bin/comm/tests/legacy_test.sh6
-rw-r--r--usr.bin/comm/tests/regress.00.out2
-rw-r--r--usr.bin/comm/tests/regress.00a.in5
-rw-r--r--usr.bin/comm/tests/regress.00b.in2
-rw-r--r--usr.bin/comm/tests/regress.01.out2
-rw-r--r--usr.bin/comm/tests/regress.01a.in5
-rw-r--r--usr.bin/comm/tests/regress.01b.in2
-rw-r--r--usr.bin/comm/tests/regress.02.out5
-rw-r--r--usr.bin/comm/tests/regress.02a.in3
-rw-r--r--usr.bin/comm/tests/regress.02b.in3
-rw-r--r--usr.bin/comm/tests/regress.sh11
13 files changed, 71 insertions, 0 deletions
diff --git a/usr.bin/comm/Makefile b/usr.bin/comm/Makefile
index 13da76f..59c9751 100644
--- a/usr.bin/comm/Makefile
+++ b/usr.bin/comm/Makefile
@@ -1,6 +1,12 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= comm
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.bin/comm/tests/Makefile b/usr.bin/comm/tests/Makefile
new file mode 100644
index 0000000..172943d
--- /dev/null
+++ b/usr.bin/comm/tests/Makefile
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/comm
+
+TAP_TESTS_SH= legacy_test
+
+FILESDIR= ${TESTSDIR}
+FILES= regress.00.out
+FILES+= regress.00a.in
+FILES+= regress.00b.in
+FILES+= regress.01.out
+FILES+= regress.01a.in
+FILES+= regress.01b.in
+FILES+= regress.02.out
+FILES+= regress.02a.in
+FILES+= regress.02b.in
+FILES+= regress.sh
+
+.include <bsd.test.mk>
diff --git a/usr.bin/comm/tests/legacy_test.sh b/usr.bin/comm/tests/legacy_test.sh
new file mode 100644
index 0000000..1b6b806
--- /dev/null
+++ b/usr.bin/comm/tests/legacy_test.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# $FreeBSD$
+
+SRCDIR="$(dirname "${0}")"; export SRCDIR
+
+m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh
diff --git a/usr.bin/comm/tests/regress.00.out b/usr.bin/comm/tests/regress.00.out
new file mode 100644
index 0000000..89a65da
--- /dev/null
+++ b/usr.bin/comm/tests/regress.00.out
@@ -0,0 +1,2 @@
+a b
+e f g
diff --git a/usr.bin/comm/tests/regress.00a.in b/usr.bin/comm/tests/regress.00a.in
new file mode 100644
index 0000000..85b5cd5
--- /dev/null
+++ b/usr.bin/comm/tests/regress.00a.in
@@ -0,0 +1,5 @@
+a b
+c d
+e f
+e f g
+h i
diff --git a/usr.bin/comm/tests/regress.00b.in b/usr.bin/comm/tests/regress.00b.in
new file mode 100644
index 0000000..89a65da
--- /dev/null
+++ b/usr.bin/comm/tests/regress.00b.in
@@ -0,0 +1,2 @@
+a b
+e f g
diff --git a/usr.bin/comm/tests/regress.01.out b/usr.bin/comm/tests/regress.01.out
new file mode 100644
index 0000000..05ab154
--- /dev/null
+++ b/usr.bin/comm/tests/regress.01.out
@@ -0,0 +1,2 @@
+a b
+e f g
diff --git a/usr.bin/comm/tests/regress.01a.in b/usr.bin/comm/tests/regress.01a.in
new file mode 100644
index 0000000..78c410b
--- /dev/null
+++ b/usr.bin/comm/tests/regress.01a.in
@@ -0,0 +1,5 @@
+a b
+c d
+e f
+e f g
+h i
diff --git a/usr.bin/comm/tests/regress.01b.in b/usr.bin/comm/tests/regress.01b.in
new file mode 100644
index 0000000..05ab154
--- /dev/null
+++ b/usr.bin/comm/tests/regress.01b.in
@@ -0,0 +1,2 @@
+a b
+e f g
diff --git a/usr.bin/comm/tests/regress.02.out b/usr.bin/comm/tests/regress.02.out
new file mode 100644
index 0000000..a451adb
--- /dev/null
+++ b/usr.bin/comm/tests/regress.02.out
@@ -0,0 +1,5 @@
+a
+b
+ c
+ d
+ e
diff --git a/usr.bin/comm/tests/regress.02a.in b/usr.bin/comm/tests/regress.02a.in
new file mode 100644
index 0000000..1c943a9
--- /dev/null
+++ b/usr.bin/comm/tests/regress.02a.in
@@ -0,0 +1,3 @@
+a
+b
+c \ No newline at end of file
diff --git a/usr.bin/comm/tests/regress.02b.in b/usr.bin/comm/tests/regress.02b.in
new file mode 100644
index 0000000..36019ee
--- /dev/null
+++ b/usr.bin/comm/tests/regress.02b.in
@@ -0,0 +1,3 @@
+c
+d
+e \ No newline at end of file
diff --git a/usr.bin/comm/tests/regress.sh b/usr.bin/comm/tests/regress.sh
new file mode 100644
index 0000000..dcd0348
--- /dev/null
+++ b/usr.bin/comm/tests/regress.sh
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+echo 1..3
+
+REGRESSION_START($1)
+
+REGRESSION_TEST(`00', `comm -12 ${SRCDIR}/regress.00a.in ${SRCDIR}/regress.00b.in')
+REGRESSION_TEST(`01', `comm -12 ${SRCDIR}/regress.01a.in ${SRCDIR}/regress.01b.in')
+REGRESSION_TEST(`02', `comm ${SRCDIR}/regress.02a.in ${SRCDIR}/regress.02b.in')
+
+REGRESSION_END()
OpenPOWER on IntegriCloud