regress.sh revision 95141
1# $FreeBSD: head/tools/regression/usr.bin/uuencode/regress.sh 95141 2002-04-20 18:44:54Z jmallett $
2
3# Go into the regression test directory, handed to us by make(1)
4TESTDIR=$1
5if [ -z "$TESTDIR" ]; then
6  TESTDIR=.
7fi
8cd $TESTDIR
9
10# Note that currently the uuencode(1) program provides no facility to
11# include the file mode explicitly based on an argument passed to it,
12# so the regress.in file must be mode 644, or the test will say that,
13# incorrectly, regression has occurred based on the header.
14
15for test in traditional base64; do
16  echo "Running test $test"
17  case "$test" in
18  traditional)
19    uuencode regress.in regress.in | diff -u regress.$test.out -
20    ;;
21  base64)
22    uuencode -m regress.in regress.in | diff -u regress.$test.out -
23    ;;
24  esac
25  if [ $? -eq 0 ]; then
26    echo "Test $test detected no regression, output matches."
27  else
28    echo "Test $test failed: regression detected.  See above."
29    exit 1
30  fi
31done
32