summaryrefslogtreecommitdiff
path: root/regress/base/multipart_io.sh
blob: ad97d5b5371743028eff1f1c797d7e1318eaa96a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
#
# $Id$
#

dir=`dirname $0`

tmp=/tmp/buf$$

trap "rm -f $tmp" 0 1 3 15


DIFF () {
	local msg=$1
	local file=`basename $msg`
 
	sed -n '1,/^$/p' $msg > $tmp
	perl $dir/multipart_io.pl $msg  >> $tmp
	diff -ub $msg $tmp && echo $file ok || echo $file fail
}

xdir=$dir/../testmails
DIFF $xdir/multipart=mixed
DIFF $xdir/multipart=mixed-preamble
DIFF $xdir/multipart=mixed-trailor

exit 0;