dhcpd-pools/tests/mustach
Sami Kerola 3369278fc0
output: make --skip to take arguments what will be skipped
Accidental typo in usage() caused realisation making skipping to fully
controllable is good idea.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-11-13 20:23:12 +00:00

21 lines
664 B
Bash
Executable file

#!/bin/sh
#
# Minimal regression test suite.
IAM=$(basename $0)
if [ ! -d tests/outputs ]; then
mkdir tests/outputs
fi
dhcpd-pools -c $top_srcdir/samples/dhcpd.conf -l $top_srcdir/samples/dhcpd.leases \
--mustach $top_srcdir/samples/mustach.template |
sed '/gettimeofday:/d; /lease_file_mtime:/d' >| tests/outputs/$IAM
echo "--- skip ok ---" >> tests/outputs/$IAM
dhcpd-pools -c $top_srcdir/samples/dhcpd.conf -l $top_srcdir/samples/dhcpd.leases \
--mustach $top_srcdir/samples/mustach.template --skip=ok --warning 44 |
sed '/gettimeofday:/d; /lease_file_mtime:/d' >> tests/outputs/$IAM
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
exit $?