X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2885665e14e1ca0aaac7d9809be4783b92b4d8d9..58d22c00deb7bc9c771c5293079f6f89bc28274a:/test/mhfixmsg/test-mhfixmsg diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index cf97d5ff..2194c7a2 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -1606,6 +1606,50 @@ run_prog mhfixmsg last -outfile "$actual" -nocrlflinebreaks -noreformat check "$expected" "$actual" +# check that input is passed through to output when there's a parse error +# (the charset string is missing its closing quote) with -outfile +cat >"$expected.err" <`mhpath new` <"$actual.err" +set -e +#### Expected output is identical to the input message. +check `mhpath last` "$actual" 'keep first' +check "$expected.err" "$actual.err" + + +# check that input is passed through to output when there's a parse error +# (the charset string is missing its closing quote) with -outfile, and +# input from stdin. Don't check err output, because it contains the name +# of a tmp file. It's similar to that of the previous check. +set +e +run_prog mhfixmsg -file - -outfile - <`mhpath last` >"$actual" 2>/dev/null +set -e +#### Expected output is identical to the input message. +check `mhpath last` "$actual" + + # make sure there are no tmp files left over find "$MH_TEST_DIR/Mail" \( -name 'mhfix*' -o -name ',mhfix*' \) -print \ >"$actual"