summaryrefslogtreecommitdiff
path: root/test/tests/mailq
blob: 0c50ba6943d4dcec22caf8fd3b5876ac3539a5f5 (plain)
1
2
3
4
5
6
7
8
9
10
. functions

echo "Testing the output of the mailq command"
echo To: nobody@nowhere | inject

$builddir/src/mailq | head -n 1 | egrep -q '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]+ bytes from <.*>$' \
|| { echo "Header is misformatted."; exit 1; }

$builddir/src/mailq | tail -n 1 | egrep -q '^  to <nobody@nowhere.q.d.n>$' \
|| { echo "Recipient is misformatted."; exit 1; }