summaryrefslogtreecommitdiffstats
path: root/tools/regression/usr.bin/file2c/regress.sh
blob: b7167882a58b6b8f14432f21e69a4e7a017e55b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# $FreeBSD$

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

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
OpenPOWER on IntegriCloud