#!/bin/sh # $Id: testsuite.in,v 1.5 2008/09/20 12:50:56 mrsam Exp $ # # Copyright 1998 - 2008 Double Precision, Inc. See COPYING for # distribution information. PWD=`pwd` 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: < References: <2@example.com> <3@example.com> From: nobody@example.com Autoreply test Original message EOF ./reformail -R subject: old-subject: <