X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/5682db8c0089c419257c612b167771e1685f683e..513587ec31160434400bb003d7160777e2db6bb6:/test/mhfixmsg/test-mhfixmsg diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index 522c0b89..77de37da 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -52,6 +52,7 @@ Usage: mhfixmsg [+folder] [msgs] [switches] -decodetext 8bit|7bit -nodecodetext -decodetypes + -[no]crlflinebreaks -[no]textcharset -[no]reformat -[no]replacetextplain @@ -584,6 +585,96 @@ run_prog mhfixmsg last check `mhpath last` "$expected" 'keep first' +# check for successful decode of a different part with attempted -decodetext +# of binary text +#### Generated the encoded text below with: +#### $ printf '\x0\xbd\xb2=\xbc\n' | base64 +cat >$expected <`mhpath new` <"$expected" <`mhpath new` <<'EOF' @@ -990,6 +1081,33 @@ run_prog mhfixmsg last -outfile "$actual" check "$expected" "$actual" +# check stripping of CRs from ASCII text context +cat >"$expected" <`mhpath new` <<'EOF' +MIME-Version: 1.0 +From: sender@example.com +To: recipient@example.com +Subject: message with CR's +Date: Mon, 29 Apr 2013 11:51:45 -0400 + +There were two CR-LF pairs at the end of this sentence. + +EOF + +run_prog mhfixmsg last -outfile "$actual" -nocrlflinebreaks +check "$expected" "$actual" + + # check -replacetextplain prepare_space >"$expected" <