diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-12-22 13:42:22 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-12-22 13:42:22 +0100 |
commit | c525c0097e9927dafa2578b51e30ed2a5ec76759 (patch) | |
tree | ddabe527240754cad93f8397e42b4bfae2bf6ecc /t | |
parent | f95439a988d73a5d946433d915cbda6ed82c864d (diff) | |
download | mblaze-c525c0097e9927dafa2578b51e30ed2a5ec76759.tar.gz mblaze-c525c0097e9927dafa2578b51e30ed2a5ec76759.tar.xz mblaze-c525c0097e9927dafa2578b51e30ed2a5ec76759.zip |
mmime: allow # in include lines, used to override the content-disposition
Diffstat (limited to 't')
-rwxr-xr-x | t/1000-mmime.t | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/t/1000-mmime.t b/t/1000-mmime.t index ab52aa1..b0b0dc5 100755 --- a/t/1000-mmime.t +++ b/t/1000-mmime.t @@ -1,7 +1,7 @@ #!/bin/sh -e cd ${0%/*} . ./lib.sh -plan 4 +plan 8 cat <<EOF >tmp References: <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@a> <bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb@b> <ccccccccccccccccccccccccccccccc@c> @@ -15,3 +15,30 @@ check 'mime -r runs' 'mmime -r <tmp >tmp2' check 'no overlong lines' 'awk "{if(length(\$0)>=80)exit 1}" <tmp2' check 'no QP when unecessary' ! grep -qF "=?" tmp2 check 'no further mime necessary' 'mmime -c <tmp2' + +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' |