2017-03-30 13:46:47 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
cd ${0%/*}
|
|
|
|
. ./lib.sh
|
2020-12-22 12:42:22 +00:00
|
|
|
plan 8
|
2017-03-30 13:46:47 +00:00
|
|
|
|
|
|
|
cat <<EOF >tmp
|
|
|
|
References: <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@a> <bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb@b> <ccccccccccccccccccccccccccccccc@c>
|
|
|
|
|
|
|
|
Body
|
|
|
|
EOF
|
|
|
|
|
2019-03-01 11:30:40 +00:00
|
|
|
# https://github.com/leahneukirchen/mblaze/issues/20
|
2017-03-30 13:46:47 +00:00
|
|
|
|
|
|
|
check 'mime -r runs' 'mmime -r <tmp >tmp2'
|
2017-03-30 14:44:00 +00:00
|
|
|
check 'no overlong lines' 'awk "{if(length(\$0)>=80)exit 1}" <tmp2'
|
2017-03-30 13:46:47 +00:00
|
|
|
check 'no QP when unecessary' ! grep -qF "=?" tmp2
|
|
|
|
check 'no further mime necessary' 'mmime -c <tmp2'
|
2020-12-22 12:42:22 +00:00
|
|
|
|
|
|
|
cat <<EOF >tmp2
|
|
|
|
Subject: inclusion test
|
|
|
|
|
|
|
|
#message/rfc822 $PWD/tmp
|
|
|
|
EOF
|
|
|
|
|
|
|
|
check 'include works' 'mmime <tmp2 | grep Body'
|
|
|
|
check 'include sets filename' 'mmime <tmp2 | grep filename=tmp'
|
|
|
|
|
|
|
|
|
|
|
|
cat <<EOF >tmp2
|
|
|
|
Subject: inclusion test no filename
|
|
|
|
|
|
|
|
#message/rfc822 $PWD/tmp>
|
|
|
|
EOF
|
|
|
|
|
|
|
|
check 'include works, overriding filename' 'mmime <tmp2 | grep Disposition | grep -v filename=tmp'
|
|
|
|
|
|
|
|
|
|
|
|
cat <<EOF >tmp2
|
|
|
|
Subject: inclusion test with other disposition
|
|
|
|
|
|
|
|
#message/rfc822#inline $PWD/tmp>
|
|
|
|
EOF
|
|
|
|
|
|
|
|
check 'include works, overriding filename' 'mmime <tmp2 | grep Disposition | grep inline'
|