]> diplodocus.org Git - nmh/commitdiff
Filter converted text/html to remove blank lines and leading space
authorDavid Levine <levinedl@acm.org>
Sat, 14 Feb 2015 05:30:03 +0000 (23:30 -0600)
committerDavid Levine <levinedl@acm.org>
Sat, 14 Feb 2015 05:30:03 +0000 (23:30 -0600)
that lynx inserts.  Also, changed ISO-8859-1 to US-ASCII because it
is, so it doesn't need to be converted.

test/mhshow/test-subpart

index 28bca94..27fb907 100755 (executable)
@@ -75,7 +75,7 @@ Content-type: multipart/alternative;
  boundary="BoundaryAlternative1"
 
 --BoundaryAlternative1
-Content-type: text/plain; charset=ISO-8859-1; format=flowed
+Content-type: text/plain; charset=US-ASCII; format=flowed
 Content-transfer-encoding: 8bit
 
 This is the body text/plain part.
@@ -115,7 +115,9 @@ This is the text/html body part.
 EOF
 
 # check it
-run_prog mhshow -part 1.1.1 -form mhl.null $msgnum > $actual 2>&1
+# The sed command removes blank lines and leading space that lynx inserts.
+run_prog mhshow -part 1.1.1 -form mhl.null $msgnum |
+    sed '/^$/D; s/^ *//;' > $actual 2>&1
 check "$expected" "$actual" : part 1.1.1
 
 # Write the expected output.