406dbc36d2
- Sort the includes of pack.c, moving sys/*.h files near the top. - Add a couple of missing #include lines, and remove the need for custom -include options in the CFLAGS of the test Makefile. - Remove the ad-hoc 'all' target, but keep its 'regress' bits for testing. - Convert the ad-hoc 'clean' target to proper CLEANFILES stuff, so that the normal bsd.prog.mk machinery can clean up. - Use `make -V .OBJDIR' to detect the place where 'pack' lives, so that regress.t works both with and without 'make obj'. Reviewed by: uqs MFC after: 1 week
40 lines
446 B
Bash
Executable File
40 lines
446 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
if test -z "${DIR}" ; then
|
|
DIR=$( make -V .OBJDIR )
|
|
fi
|
|
if test -z "${DIR}" ; then
|
|
DIR=$( dirname $0 )
|
|
fi
|
|
|
|
check()
|
|
{
|
|
NUM=$1
|
|
shift
|
|
if $DIR/pack $*
|
|
then
|
|
echo "ok $NUM"
|
|
else
|
|
echo "not ok $NUM"
|
|
fi
|
|
}
|
|
|
|
(cd $DIR ; make pack) >/dev/null 2>&1
|
|
|
|
echo 1..7
|
|
|
|
check 1 0 0
|
|
check 2 0 1
|
|
check 3 1 0
|
|
check 4 1 999999
|
|
check 5 1 1000000
|
|
check 6 2147483647 999999
|
|
check 7 10000000
|
|
|
|
(cd $DIR ; make clean) >/dev/null 2>&1
|
|
|
|
exit 0
|