]> diplodocus.org Git - nmh/blobdiff - test/mhfixmsg/test-mhfixmsg
Just show relevant portion of invalid encoded string.
[nmh] / test / mhfixmsg / test-mhfixmsg
index 167c2379f64f905f9ec6bad5b71b699077b8a3fe..5f33b79b917b8975e464236c6ce8d6ecae7da4ee 100755 (executable)
@@ -16,9 +16,10 @@ fi
 
 setup_test
 
 
 setup_test
 
+check_exit '-eq 1' mhfixmsg -
+
 #### Make sure that html-to-text conversion is what we expect.
 #### Make sure that html-to-text conversion is what we expect.
-require_locale en_US.utf-8 en_US.utf8
-LC_ALL=en_US.UTF-8; export LC_ALL
+require_locale en_US.UTF-8 en_US.UTF8 en_US.utf-8 en_US.utf8
 
 expected="$MH_TEST_DIR/test-mhfixmsg$$.expected"
 expected_err="$MH_TEST_DIR/test-mhfixmsg$$.expected_err"
 
 expected="$MH_TEST_DIR/test-mhfixmsg$$.expected"
 expected_err="$MH_TEST_DIR/test-mhfixmsg$$.expected_err"
@@ -1071,6 +1072,7 @@ fi
 
 
 # check handling of rfc822 message type
 
 
 # check handling of rfc822 message type
+# also, checks -fixboundary
 start_test "handling of rfc822 message type"
 cat >"$expected" <<EOF
 From: Test <test@example.com>
 start_test "handling of rfc822 message type"
 cat >"$expected" <<EOF
 From: Test <test@example.com>
@@ -1108,7 +1110,7 @@ Date: Fri, 29 Sep 2006 00:00:00
 Message-Id: @test.nmh
 Subject: message with message/rfc822 attachment
 MIME-Version: 1.0
 Message-Id: @test.nmh
 Subject: message with message/rfc822 attachment
 MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaa0"
+Content-Type: multipart/mixed; boundary="----- =badboundary"
 
 and some garbage before the attachment
 
 
 and some garbage before the attachment
 
@@ -1712,6 +1714,17 @@ set +e
 run_prog mhfixmsg -file - -outfile - <`mhpath last` >"$actual" 2>/dev/null
 set -e
 #### Expected output is identical to the input message.
 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" 'keep first'
+
+
+start_test "pass through message with relative folder path with parse error"
+#### Factor out leading portion of current folder path and make it relative.
+pwd=`pwd`
+set +e
+run_prog mhfixmsg +./`mhpath | sed "s%^$pwd/%%"` last -out - >"$actual" 2>/dev/null
+set -e
+folder -f +inbox >/dev/null
+#### Expected output is identical to the input message.
 check `mhpath last` "$actual"
 
 
 check `mhpath last` "$actual"