freebsd-dev/tools/regression/usr.bin/join/regress.sh
Juli Mallett 3df2cd2cc9 A simple test for join(1) based on tjr's test case for -o 0.
Partially based on:	PR standards/36072
2002-04-20 19:33:23 +00:00

18 lines
392 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
join -t , -a1 -a2 -e '(unknown)' -o 0,1.2,2.2 regress.1.in regress.2.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