masqmail-0.2

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