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 (2010-05-30)
parents
children 0379789a847b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/relay-to-hostname-mta/test.tpl	Sun May 30 16:05:49 2010 +0200
@@ -0,0 +1,78 @@
+#! /bin/bash
+
+# should be run from within tests dir set if you move this:
+mm_bin=../../src/masqmail
+
+hfrom="\"Fritz Meier\" <`logname`@RECV_HOST>"
+hto="$hfrom"
+to=`logname`@RECV_HOST
+hsubject="MasqMail stdin Test"
+
+
+# Testing with rcpt on cmd line
+# (dot does end)
+#
+# the command to be run:
+cmd="$mm_bin -C ./test.conf $to"
+
+$cmd <<EOF
+From: $hfrom
+To: $hto
+Subject: $hsubject
+
+Hallo Fritz!
+
+..
+there is a dot above (Yes, one and not two).
+
+command was: $cmd
+
+Fritz
+.
+
+EOF
+
+#
+# Testing with rcpt on cmd line with -oi option
+# (dot does not end)
+#
+# the command to be run:
+cmd="$mm_bin -C ./test.conf -oi $to"
+
+$cmd <<EOF
+From: $hfrom
+To: $hto
+Subject: $hsubject
+
+Hallo Fritz!
+.
+there is a dot above.
+
+command was: $cmd
+
+Fritz
+
+EOF
+
+#
+# Testing with rcpt read from headers (-t option)
+# (dot does end)
+#
+# the command to be run:
+cmd="$mm_bin -C ./test.conf -t"
+
+$cmd <<EOF
+From: $hfrom
+To: $hto
+Subject: $hsubject
+
+Hallo Fritz!
+..
+there is a dot above.
+
+command was: $cmd
+
+Fritz
+.
+
+EOF