Move all remaining tests except for:

make(1):	Does not work like the other tests.  Its Makefile is
			self-testing.
	m4(1):		It uses complex voodo to test GNU m4(1) features.

To the new framework.  I had worried about passing the binary data that
uudecode(1)'s test passes to diff(1) might give a user something nasty,
but this is unlikely to happen as even with an unmodified old nasty
diff(1) which doesn't recognise many binary files, these binary files
are recognised.  Using $DIFF instead of `diff' in the library and making
it possible to override this with `cmp -s' might be nice some day, but
as of this second, there's no immediate need.
This commit is contained in:
Juli Mallett 2002-06-24 14:22:44 +00:00
parent e51cc505de
commit fa9fbb5f01
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98759
10 changed files with 23 additions and 73 deletions

View File

@ -1,4 +1,4 @@
# $FreeBSD$
all:
@sh ${.CURDIR}/regress.sh ${.CURDIR}
@m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR}

View File

@ -1,16 +1,7 @@
# $FreeBSD$
# Go into the regression test directory, handed to us by make(1)
TESTDIR=$1
if [ -z "$TESTDIR" ]; then
TESTDIR=.
fi
cd $TESTDIR
REGRESSION_START($1)
file2c 'const char data[] = {' ', 0};' < regress.in | diff -u regress.out -
if [ $? -eq 0 ]; then
echo "PASS: Test detected no regression, output matches."
else
echo "FAIL: Test failed: regression detected. See above."
exit 1
fi
REGRESSION_TEST_ONE(`file2c "const char data[] = {" ", 0};" < regress.in')
REGRESSION_END()

View File

@ -1,4 +1,4 @@
# $FreeBSD$
all:
@sh ${.CURDIR}/regress.sh ${.CURDIR}
@m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR}

View File

@ -1,17 +1,7 @@
# $FreeBSD$
# Go into the regression test directory, handed to us by make(1)
TESTDIR=$1
if [ -z "$TESTDIR" ]; then
TESTDIR=.
fi
cd $TESTDIR
REGRESSION_START($1)
join -t , -a1 -a2 -e '(unknown)' -o 0,1.2,2.2 regress.1.in regress.2.in | \
diff -u regress.out -
if [ $? -eq 0 ]; then
echo "PASS: Test detected no regression, output matches."
else
echo "FAIL: Test failed: regression detected. See above."
exit 1
fi
REGRESSION_TEST_ONE(`join -t , -a1 -a2 -e "(unknown)" -o 0,1.2,2.2 regress.1.in regress.2.in')
REGRESSION_END()

View File

@ -1,4 +1,4 @@
# $FreeBSD$
all:
@sh ${.CURDIR}/regress.sh ${.CURDIR}
@m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR}

View File

@ -1,16 +1,7 @@
# $FreeBSD$
# Go into the regression test directory, handed to us by make(1)
TESTDIR=$1
if [ -z "$TESTDIR" ]; then
TESTDIR=.
fi
cd $TESTDIR
REGRESSION_START($1)
jot -w '%X' -s ',' 100 1 200 | diff -u regress.out -
if [ $? -eq 0 ]; then
echo "PASS: Test detected no regression, output matches."
else
echo "FAIL: Test failed: regression detected. See above."
exit 1
fi
REGRESSION_TEST_ONE(`jot -w "%X" -s , 100 1 200')
REGRESSION_END()

View File

@ -1,4 +1,4 @@
# $FreeBSD$
all:
@sh ${.CURDIR}/regress.sh ${.CURDIR}
@m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR}

View File

@ -1,13 +1,6 @@
# $FreeBSD$
# Go into the regression test directory, handed to us by make(1)
TESTDIR=$1
if [ -z "$TESTDIR" ]; then
TESTDIR=.
fi
cd $TESTDIR
STATUS=0
REGRESSION_START($1)
for test in GNU/changecom changecom; do
echo "Running test $test"
@ -35,4 +28,4 @@ for test in GNU/changecom changecom; do
fi
done
exit $STATUS
REGRESSION_END()

View File

@ -1,4 +1,4 @@
# $FreeBSD$
all:
@sh ${.CURDIR}/regress.sh ${.CURDIR}
@m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR}

View File

@ -1,23 +1,8 @@
# $FreeBSD$
# Go into the regression test directory, handed to us by make(1)
TESTDIR=$1
if [ -z "$TESTDIR" ]; then
TESTDIR=.
fi
cd $TESTDIR
REGRESSION_START($1)
STATUS=0
REGRESSION_TEST_ONE(`uudecode -p < regress.traditional.in', `traditional')
REGRESSION_TEST_ONE(`uudecode -p < regress.base64.in', `base64')
for test in traditional base64; do
echo "Running test $test"
uudecode -p < regress.$test.in | cmp regress.out -
if [ $? -eq 0 ]; then
echo "PASS: Test $test detected no regression, output matches."
else
STATUS=$?
echo "FAIL: Test $test failed: regression detected. See above."
fi
done
exit $STATUS
REGRESSION_END()