freebsd-dev/tools/regression/usr.bin/uuencode/regress.sh
Juli Mallett 4b7f276dfd Redirect stdin from the input file, rather than passing the input file to
uuencode(1), and set a umask, so that the mode in the header is predictable.

If it varies, then the test is right to fail.

Remove the note about this test falsely failing, with that in mind.
2002-04-27 03:11:33 +00:00

34 lines
683 B
Bash

# $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
# To make sure we end up with matching headers.
umask 022
for test in traditional base64; do
echo "Running test $test"
case "$test" in
traditional)
uuencode regress.in < regress.in | diff -u regress.$test.out -
;;
base64)
uuencode -m regress.in < regress.in | diff -u regress.$test.out -
;;
esac
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