]>
diplodocus.org Git - nmh/blob - test/post/test-post-common.sh
3 # Common routines for the post tests
8 .
"${MH_OBJ_DIR}/test/common.sh"
12 arith_eval
64000 + `id -u` % 1000
14 testname
="${MH_TEST_DIR}/$$"
17 # Set this for the EHLO command
20 echo "clientname: nosuchhost.example.com" >> ${MHMTSCONF}
23 # One "post" test run. Ok, yeah, we're using "send", but that's just
24 # because it's easier.
25 # $1: output filename for fakesmtp, i.e., the sent message
27 # $3: optional switches for send
30 { pid
=`"${MH_OBJ_DIR}/test/fakesmtp" "$1" $localport`
32 run_prog send
-draft -server 127.0.0.1 -port $localport $3 || exit 1
35 # It's hard to calculate the exact Date: header post is going to
36 # use, so we'll just use sed to remove the actual date so we can easily
37 # compare it against our "correct" output.
40 sed -e 's/^Date:.*/Date:/' "$1" > "$1".nodate
43 check
"$1".nodate
"$2"