masqmail-0.2

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