diff options
Diffstat (limited to 'tools/regression/usr.bin/file2c/regress.sh')
-rw-r--r-- | tools/regression/usr.bin/file2c/regress.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/file2c/regress.sh b/tools/regression/usr.bin/file2c/regress.sh new file mode 100644 index 000000000000..7f4c2717de77 --- /dev/null +++ b/tools/regression/usr.bin/file2c/regress.sh @@ -0,0 +1,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 "Test detected no regression, output matches." +else + echo "Test failed: regression detected. See above." + exit 1 +fi |