masqmail

diff tests/localhost-stdin/test @ 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 tests/test.templ@08114f7dcc23
children 0379789a847b
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/localhost-stdin/test	Sun May 30 16:05:49 2010 +0200
     1.3 @@ -0,0 +1,79 @@
     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 +#
    1.10 +hfrom="\"Fritz Meier\" <`logname`@localhost>"
    1.11 +hto=$hfrom
    1.12 +to=`logname`@localhost
    1.13 +hsubject="MasqMail stdin Test"
    1.14 +
    1.15 +#
    1.16 +# Testing with rcpt on cmd line
    1.17 +# (dot does end)
    1.18 +#
    1.19 +# the command to be run:
    1.20 +cmd="$mm_bin -C ./test.conf $to"
    1.21 +
    1.22 +$cmd <<EOF
    1.23 +From: $hfrom
    1.24 +To: $hto
    1.25 +Subject: $hsubject
    1.26 +
    1.27 +Hallo Fritz!
    1.28 +
    1.29 +..
    1.30 +there is a dot above (Yes, one and not two).
    1.31 +
    1.32 +command was: $cmd
    1.33 +
    1.34 +Fritz
    1.35 +.
    1.36 +
    1.37 +EOF
    1.38 +
    1.39 +#
    1.40 +# Testing with rcpt on cmd line with -oi option
    1.41 +# (dot does not end)
    1.42 +#
    1.43 +# the command to be run:
    1.44 +cmd="$mm_bin -C ./test.conf -oi $to"
    1.45 +
    1.46 +$cmd <<EOF
    1.47 +From: $hfrom
    1.48 +To: $hto
    1.49 +Subject: $hsubject
    1.50 +
    1.51 +Hallo Fritz!
    1.52 +.
    1.53 +there is a dot above.
    1.54 +
    1.55 +command was: $cmd
    1.56 +
    1.57 +Fritz
    1.58 +
    1.59 +EOF
    1.60 +
    1.61 +#
    1.62 +# Testing with rcpt read from headers (-t option)
    1.63 +# (dot does end)
    1.64 +#
    1.65 +# the command to be run:
    1.66 +cmd="$mm_bin -C ./test.conf -t"
    1.67 +
    1.68 +$cmd <<EOF
    1.69 +From: $hfrom
    1.70 +To: $hto
    1.71 +Subject: $hsubject
    1.72 +
    1.73 +Hallo Fritz!
    1.74 +..
    1.75 +there is a dot above.
    1.76 +
    1.77 +command was: $cmd
    1.78 +
    1.79 +Fritz
    1.80 +.
    1.81 +
    1.82 +EOF