#!/bin/sh # # Copyright 1998 - 2011 Double Precision, Inc. See COPYING for # distribution information. PWD=`pwd` unset LC_CTYPE unset LC_NUMERIC unset LC_TIME unset LC_COLLATE unset LC_MONETARY unset LC_MESSAGES unset LC_PAPER unset LC_NAME unset LC_ADDRESS unset LC_TELEPHONE unset LC_MEASUREMENT unset LC_IDENTIFICATION unset LC_ALL if test "@USE_GDBM@@USE_DB@" != "00" -a -x ../makedat/makedatprog then cat <testsuite.chk foo bar foo.bar.com foobar foobar@foo.bar.com barfoo . EOF ../makedat/makedatprog testsuite.chk testsuite.tmp testsuite.dat cat <testsuite.recipe if ( gdbmopen("$PWD/testsuite.dat", "R") != 0 ) { exit } FOO=gdbmfetch("foo") echo "FOO: \$FOO" FOO=gdbmfetch("foobar@foo.bar.com", "D") echo "FOO: \$FOO" FOO=gdbmfetch("foobaz@foo.bar.com", "D") echo "FOO: \$FOO" EOF chmod go-rw testsuite.recipe cat <testsuite.chk FOO: bar FOO: barfoo FOO: foobar EOF ./maildrop ./testsuite.recipe testsuite.recipe MAILDIRQUOTA="1C" exception { cc "$PWD/testsuite.maildir" echo "Delivered message one" cc "$PWD/testsuite.maildir" echo "Delivered message two" } echo "Done." exit EOF chmod go-rw testsuite.recipe cat <testsuite.chk Delivered message one Done. EOF echo "To: testsuite" | ./maildrop ./testsuite.recipe 2>/dev/null \ | diff - testsuite.chk fi cat <testsuite.recipe if ( 2 && 3 ) { echo "Yes1" } if ( 2 && 0 ) { echo "No1" } if ( 2 & 1 ) { echo "No2" } if ( 2 & 3 ) { echo "Yes2" } a=(4 || 2) echo "Four: \$a" a=(4 | 2) echo "Six: \$a" a=(5 && 3) echo "Three: \$a" a=(5 & 3) echo "One: \$a" a=! 5 echo "Zero: \$a" a= ~5 echo "Minus six: \$a" EOF chmod go-rw testsuite.recipe ./maildrop ./testsuite.recipe testmsg.$FILENO' < EOF echo "Not dupe: $?" ./reformail -D 2000 testcache.dat < EOF echo "Not dupe: $?" rm -f testcache.dat ./reformail -x from: -x subject: <testmailbot.1 < Return-Path: test2@example.com Subject: Re: test message (fwd) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Original test message EOF cat >testmailbot.msg <testmailbot.1 < To: toaddress@example.com Cc: ccaddress@example.com X-Newsgroup: alt.test Newsgroups: alt.test.1,alt.test.2 Message-Id: Errors-To: test2@example.com Date: Sun, 22 Nov 2009 11:57:32 -0400 Subject: Re: test message, =?iso-8859-1?Q?H=F3la!?= (fwd) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Original test message EOF LANG=en_US.utf-8 ./mailbot -m testmailbot.msg cat testsuite.recipe <testsuite.msg < test EOF ./maildrop testsuite.recipe testsuite.msg < test EOF ./maildrop testsuite.recipe testsuite.recipe <, user2@example.com;') exit EOF ./maildrop testsuite.recipe testmailbot.1 <testmailbot.msg <testmailbot.1 <H=F3la! --zzz-- EOF echo "====================" LANG=en_US.utf-8 ./mailbot -T forward -F '+++ Forwarded Message +++' -m testmailbot.msg cat testmailbot.1 <Attachment h=F3la! --zzz-- EOF echo "====================" LANG=en_US.utf-8 ./mailbot -T forward -F '+++ Forwarded Message +++' -m testmailbot.msg cat testmailbot.1 <HTML message only EOF echo "====================" LANG=en_US.utf-8 ./mailbot -T forward -F '+++ Forwarded Message +++' -m testmailbot.msg cat testmailbot.1 <HTML message only --yyy-- --zzz Content-Type: text/plain Text attachment --zzz-- EOF echo "====================" LANG=en_US.utf-8 ./mailbot -T forward -F '+++ Forwarded Message +++' -m testmailbot.msg cat Quote level 1 >> Quote level 2 > space EOF LANG=en_US.utf-8 ./mailbot -T forward -F '+++ Forwarded Message +++' -m testmailbot.msg cat < Quote level 1 >> Quote level 2 > space EOF rm -f testsuite.recipe rm -f testsuite.msg rm -f testsuite.chk rm -f testmailbot.msg rm -f testmailbot.1 rm -f testsuite.dat