masqmail-0.2

diff tests/relay-to-hostname-mta/test.tpl @ 63:49ca781e1503

reworked the test cases completely they are split into four independent tests now and each one is tested to work with the current version
author meillo@marmaro.de
date Sun, 30 May 2010 16:05:49 +0200
parents
children 0379789a847b
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/relay-to-hostname-mta/test.tpl	Sun May 30 16:05:49 2010 +0200
     1.3 @@ -0,0 +1,78 @@
     1.4 +#! /bin/bash
     1.5 +
     1.6 +# should be run from within tests dir set if you move this:
     1.7 +mm_bin=../../src/masqmail
     1.8 +
     1.9 +hfrom="\"Fritz Meier\" <`logname`@RECV_HOST>"
    1.10 +hto="$hfrom"
    1.11 +to=`logname`@RECV_HOST
    1.12 +hsubject="MasqMail stdin Test"
    1.13 +
    1.14 +
    1.15 +# Testing with rcpt on cmd line
    1.16 +# (dot does end)
    1.17 +#
    1.18 +# the command to be run:
    1.19 +cmd="$mm_bin -C ./test.conf $to"
    1.20 +
    1.21 +$cmd <<EOF
    1.22 +From: $hfrom
    1.23 +To: $hto
    1.24 +Subject: $hsubject
    1.25 +
    1.26 +Hallo Fritz!
    1.27 +
    1.28 +..
    1.29 +there is a dot above (Yes, one and not two).
    1.30 +
    1.31 +command was: $cmd
    1.32 +
    1.33 +Fritz
    1.34 +.
    1.35 +
    1.36 +EOF
    1.37 +
    1.38 +#
    1.39 +# Testing with rcpt on cmd line with -oi option
    1.40 +# (dot does not end)
    1.41 +#
    1.42 +# the command to be run:
    1.43 +cmd="$mm_bin -C ./test.conf -oi $to"
    1.44 +
    1.45 +$cmd <<EOF
    1.46 +From: $hfrom
    1.47 +To: $hto
    1.48 +Subject: $hsubject
    1.49 +
    1.50 +Hallo Fritz!
    1.51 +.
    1.52 +there is a dot above.
    1.53 +
    1.54 +command was: $cmd
    1.55 +
    1.56 +Fritz
    1.57 +
    1.58 +EOF
    1.59 +
    1.60 +#
    1.61 +# Testing with rcpt read from headers (-t option)
    1.62 +# (dot does end)
    1.63 +#
    1.64 +# the command to be run:
    1.65 +cmd="$mm_bin -C ./test.conf -t"
    1.66 +
    1.67 +$cmd <<EOF
    1.68 +From: $hfrom
    1.69 +To: $hto
    1.70 +Subject: $hsubject
    1.71 +
    1.72 +Hallo Fritz!
    1.73 +..
    1.74 +there is a dot above.
    1.75 +
    1.76 +command was: $cmd
    1.77 +
    1.78 +Fritz
    1.79 +.
    1.80 +
    1.81 +EOF