masqmail

annotate 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
rev   line source
meillo@0 1 #! /bin/bash
meillo@0 2
meillo@63 3 # should be run from within tests dir set if you move this:
meillo@63 4 mm_bin=../../src/masqmail
meillo@0 5
meillo@0 6 #
meillo@63 7 hfrom="\"Fritz Meier\" <`logname`@localhost>"
meillo@0 8 hto=$hfrom
meillo@63 9 to=`logname`@localhost
meillo@0 10 hsubject="MasqMail stdin Test"
meillo@0 11
meillo@0 12 #
meillo@0 13 # Testing with rcpt on cmd line
meillo@0 14 # (dot does end)
meillo@0 15 #
meillo@0 16 # the command to be run:
meillo@0 17 cmd="$mm_bin -C ./test.conf $to"
meillo@0 18
meillo@0 19 $cmd <<EOF
meillo@0 20 From: $hfrom
meillo@0 21 To: $hto
meillo@0 22 Subject: $hsubject
meillo@0 23
meillo@0 24 Hallo Fritz!
meillo@0 25
meillo@0 26 ..
meillo@0 27 there is a dot above (Yes, one and not two).
meillo@0 28
meillo@0 29 command was: $cmd
meillo@0 30
meillo@0 31 Fritz
meillo@0 32 .
meillo@0 33
meillo@0 34 EOF
meillo@0 35
meillo@0 36 #
meillo@0 37 # Testing with rcpt on cmd line with -oi option
meillo@0 38 # (dot does not end)
meillo@0 39 #
meillo@0 40 # the command to be run:
meillo@0 41 cmd="$mm_bin -C ./test.conf -oi $to"
meillo@0 42
meillo@0 43 $cmd <<EOF
meillo@0 44 From: $hfrom
meillo@0 45 To: $hto
meillo@0 46 Subject: $hsubject
meillo@0 47
meillo@0 48 Hallo Fritz!
meillo@0 49 .
meillo@0 50 there is a dot above.
meillo@0 51
meillo@0 52 command was: $cmd
meillo@0 53
meillo@0 54 Fritz
meillo@0 55
meillo@0 56 EOF
meillo@0 57
meillo@0 58 #
meillo@0 59 # Testing with rcpt read from headers (-t option)
meillo@0 60 # (dot does end)
meillo@0 61 #
meillo@0 62 # the command to be run:
meillo@0 63 cmd="$mm_bin -C ./test.conf -t"
meillo@0 64
meillo@0 65 $cmd <<EOF
meillo@0 66 From: $hfrom
meillo@0 67 To: $hto
meillo@0 68 Subject: $hsubject
meillo@0 69
meillo@0 70 Hallo Fritz!
meillo@0 71 ..
meillo@0 72 there is a dot above.
meillo@0 73
meillo@0 74 command was: $cmd
meillo@0 75
meillo@0 76 Fritz
meillo@0 77 .
meillo@0 78
meillo@0 79 EOF