]> diplodocus.org Git - nmh/blobdiff - test/mhfixmsg/test-mhfixmsg
One more formatting chagned to the input in test-mhfixmsg. One of
[nmh] / test / mhfixmsg / test-mhfixmsg
index 10ac24ec2978fcb0d954b9559bc58b6642a0d06f..f7eb34b3a3afbf4a6c7b82d9a4b5a136968d9a7e 100755 (executable)
@@ -599,7 +599,7 @@ Mile                                     $0.00
 Time                                    $78.71
 State Tax                                $5.90
 Vehicle License Fee                      $1.84
-State Txn Tax                            $6.00
+State Txn T                            $6.00
 
 ------=_nmh-multipart
 Content-Type: text/html; charset="ISO-8859-1"
@@ -622,7 +622,7 @@ a, sans-serif" color=3D"#333333" size=3D"2"><strong>Vehicle License Fee</s=
 trong></font></td><td height=3D"3">&nbsp;</td><td align=3D"right"><font fa=
 ce=3D"Arial, Helvetica, sans-serif" color=3D"#333333" size=3D"2">$1.84</fo=
 nt></td></tr><tr><td><font face=3D"Arial, Helvetica, sans-serif" color=3D"=
-#333333" size=3D"2"><strong>State Txn Tax</strong></font></td><td height=3D=
+#333333" size=3D"2"><strong>State Txn Tx</strong></font></td><td height=3D=
 "3">&nbsp;</td><td align=3D"right"><font face=3D"Arial, Helvetica, sans-se=
 rif" color=3D"#333333" size=3D"2">$6.00</font></td></tr>
 
@@ -644,31 +644,36 @@ Subject: body requires binary encoding
 <body>
 <table width=3D"325" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">
 <tr><td><font face=3D"Arial, Helvetica, sans-serif" color=3D"#333333" size=
-=3D"2"><strong>Mile</strong></font></td><td height=3D"3">&nbsp;</td><td ali=
-gn=3D"right"><font face=3D"Arial, Helvetica, sans-serif" color=3D"#333333" =
-size=3D"2">$0.00</font></td></tr><tr><td><font face=3D"Arial, Helvetica, sa=
-ns-serif" color=3D"#333333" size=3D"2"><strong>Time</strong></font></td><td=
- height=3D"3">&nbsp;</td><td align=3D"right"><font face=3D"Arial, Helvetica=
-, sans-serif" color=3D"#333333" size=3D"2">$78.71</font></td></tr><tr><td><=
-font face=3D"Arial, Helvetica, sans-serif" color=3D"#333333" size=3D"2"><st=
-rong>State Tax</strong></font></td><td height=3D"3">&nbsp;</td><td align=3D=
-"right"><font face=3D"Arial, Helvetica, sans-serif" color=3D"#333333" size=
-=3D"2">$5.90</font></td></tr><tr><td><font face=3D"Arial, Helvetica, sans-s=
-erif" color=3D"#333333" size=3D"2"><strong>Vehicle License Fee</strong></fo=
-nt></td><td height=3D"3">&nbsp;</td><td align=3D"right"><font face=3D"Arial=
-, Helvetica, sans-serif" color=3D"#333333" size=3D"2">$1.84</font></td></tr=
-><tr><td><font face=3D"Arial, Helvetica, sans-serif" color=3D"#333333" size=
-=3D"2"><strong>State Txn Tax</strong></font></td><td height=3D"3">&nbsp;</t=
-d><td align=3D"right"><font face=3D"Arial, Helvetica, sans-serif" color=3D"=
-#333333" size=3D"2">$6.00</font></td></tr>
+=3D"2"><strong>Mile</strong></font></td><td height=3D"3">&nbsp;</td><td al=
+ign=3D"right"><font face=3D"Arial, Helvetica, sans-serif" color=3D"#333333=
+" size=3D"2">$0.00</font></td></tr><tr><td><font face=3D"Arial, Helvetica,=
+ sans-serif" color=3D"#333333" size=3D"2"><strong>Time</strong></font></td=
+><td height=3D"3">&nbsp;</td><td align=3D"right"><font face=3D"Arial, Helv=
+etica, sans-serif" color=3D"#333333" size=3D"2">$78.71</font></td></tr><tr=
+><td><font face=3D"Arial, Helvetica, sans-serif" color=3D"#333333" size=3D=
+"2"><strong>State Tax</strong></font></td><td height=3D"3">&nbsp;</td><td =
+align=3D"right"><font face=3D"Arial, Helvetica, sans-serif" color=3D"#3333=
+33" size=3D"2">$5.90</font></td></tr><tr><td><font face=3D"Arial, Helvetic=
+a, sans-serif" color=3D"#333333" size=3D"2"><strong>Vehicle License Fee</s=
+trong></font></td><td height=3D"3">&nbsp;</td><td align=3D"right"><font fa=
+ce=3D"Arial, Helvetica, sans-serif" color=3D"#333333" size=3D"2">$1.84</fo=
+nt></td></tr><tr><td><font face=3D"Arial, Helvetica, sans-serif" color=3D"=
+#333333" size=3D"2"><strong>State Txn Tx</strong></font></td><td height=3D=
+"3">&nbsp;</td><td align=3D"right"><font face=3D"Arial, Helvetica, sans-se=
+rif" color=3D"#333333" size=3D"2">$6.00</font></td></tr>
 
 </body>
 </html>
 EOF
 
-#### lynx inserts multiple blank lines, so use uniq to squeeze them.
-mhfixmsg last -outfile - | uniq >"$actual"
-check "$expected" "$actual" 'ignore space'
+if [ $can_reformat_texthtml -eq 1 ]; then
+  #### lynx inserts multiple blank lines, so use uniq to squeeze them.
+  mhfixmsg last -outfile - | uniq >"$actual"
+  check "$expected" "$actual" 'ignore space'
+else
+  cp -p "$MH_TEST_DIR/Mail/inbox/15" "$MH_TEST_DIR/Mail/inbox/15.backup"
+  rm -f "$expected"
+fi
 
 
 # check -textcodeset
@@ -869,6 +874,7 @@ else
   rm -f "$expected"
 fi
 
+
 # check handling of rfc822 message type
 cat >"$expected" <<EOF
 From: Test <test@example.com>
@@ -932,6 +938,33 @@ run_test 'mhfixmsg last -outfile '"$actual" ''
 check "$expected" "$actual"
 
 
+# check stripping of CRs from ASCII text context
+cat >"$expected" <<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 are two CR-LF pairs at the end of this sentence.
+
+EOF
+
+cat >`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 are two CR-LF pairs at the end of this sentence.\r
+\r
+EOF
+
+mhfixmsg last -outfile "$actual"
+check "$expected" "$actual"
+
+
 # check rmmproc
 cat >"$MH_TEST_DIR/Mail/rmmproc" <<'EOF'
 mv "$1" "$1.backup"