# $FreeBSD$

# Go into the regression test directory, handed to us by make(1)
TESTDIR=$1
if [ -z "$TESTDIR" ]; then
  TESTDIR=.
fi
cd $TESTDIR

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

# $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

Add a comment regarding the file header, and the mode that the file is created with.
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.
