freebsd-dev/tools/regression/usr.bin/uuencode/regress.sh
Juli Mallett 2cf0f79dcb Add a comment regarding the file header, and the mode that the file is created
with.

This should be fixed shortly by adding the (desirable) option to set the file
creation mode on the command line.
2002-04-20 18:44:54 +00:00

32 lines
852 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
# Note that currently the uuencode(1) program provides no facility to
# include the file mode explicitly based on an argument passed to it,
# so the regress.in file must be mode 644, or the test will say that,
# incorrectly, regression has occurred based on the header.
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 "Test $test detected no regression, output matches."
else
echo "Test $test failed: regression detected. See above."
exit 1
fi
done