run_test 'mhfixmsg first -outfile '"$actual" ''
check "`mhpath first`" "$actual" 'keep first'
# check that non-MIME messages with no bodies aren't modified
# check -outfile
run_test 'mhfixmsg first -outfile '"$actual" ''
check "`mhpath first`" "$actual" 'keep first'
# check that non-MIME messages with no bodies aren't modified
# check -outfile
cp "$MH_TEST_DIR"/Mail/inbox/11 "$MH_TEST_DIR"/Mail/inbox/11.original
folder last >/dev/null
run_test 'mhfixmsg -file '"$MH_TEST_DIR"/Mail/inbox/11 ''
cp "$MH_TEST_DIR"/Mail/inbox/11 "$MH_TEST_DIR"/Mail/inbox/11.original
folder last >/dev/null
run_test 'mhfixmsg -file '"$MH_TEST_DIR"/Mail/inbox/11 ''
run_test "mhfixmsg `mhpath last` -outfile /dev/null" ''
# check handling of boundary string that appears in message body
run_test "mhfixmsg `mhpath last` -outfile /dev/null" ''
# check handling of boundary string that appears in message body
# check attempted (default, 8 bit) -decodetext of binary text
#### Generated the encoded text below with:
# check attempted (default, 8 bit) -decodetext of binary text
#### Generated the encoded text below with:
# check for successful decode of a different part with attempted -decodetext
# of binary (>998 characters) text
# check for successful decode of a different part with attempted -decodetext
# of binary (>998 characters) text
prepare_space >"$expected" <<'EOF'
MIME-Version: 1.0
Date: Thu, 11 Apr 2013 02:47:08 -0700
prepare_space >"$expected" <<'EOF'
MIME-Version: 1.0
Date: Thu, 11 Apr 2013 02:47:08 -0700
run_prog mhfixmsg -file - -verbose <`mhpath last` >"$actual" 2>"$actual.err"
check "$expected" "$actual"
if grep "mhfixmsg: $MH_TEST_DIR/Mail/.*, fix multipart boundary" \
run_prog mhfixmsg -file - -verbose <`mhpath last` >"$actual" 2>"$actual.err"
check "$expected" "$actual"
if grep "mhfixmsg: $MH_TEST_DIR/Mail/.*, fix multipart boundary" \
cat >"$expected" <<EOF
Date: Fri, 13 May 2011 08:21:12 -0500
Content-Type: multipart/alternative;
cat >"$expected" <<EOF
Date: Fri, 13 May 2011 08:21:12 -0500
Content-Type: multipart/alternative;
cat >`mhpath new` <<EOF
Date: Fri, 13 May 2011 08:21:12 -0500
Content-Type: multipart/alternative;
cat >`mhpath new` <<EOF
Date: Fri, 13 May 2011 08:21:12 -0500
Content-Type: multipart/alternative;
run_test 'mhfixmsg 21 -rmmproc true'
if test -f '${MH_TEST_DIR}/Mail/inbox/22.backup'; then
echo check of mhfixmsg -rmmproc FAILED, should not have created backup file
run_test 'mhfixmsg 21 -rmmproc true'
if test -f '${MH_TEST_DIR}/Mail/inbox/22.backup'; then
echo check of mhfixmsg -rmmproc FAILED, should not have created backup file
# check that input is passed through to output when there's a parse error
# (the charset string is missing its closing quote) with -outfile
# check that input is passed through to output when there's a parse error
# (the charset string is missing its closing quote) with -outfile
# (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.
# (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.