]> diplodocus.org Git - nmh/commitdiff
modify tests for the new mhshow mime part marker format
authorPaul Fox <pgf@foxharp.boston.ma.us>
Tue, 6 May 2014 02:41:43 +0000 (22:41 -0400)
committerPaul Fox <pgf@foxharp.boston.ma.us>
Wed, 7 May 2014 15:29:34 +0000 (11:29 -0400)
also added a couple of Content-Description headers to better
test the marker format.

test/bad-input/test-header
test/mhshow/test-charset
test/mhshow/test-cte-binary
test/mhshow/test-msg-buffer-boundaries
test/mhshow/test-qp
test/mhshow/test-subpart
test/mhshow/test-textcharset

index ea5385f..0666cdb 100755 (executable)
@@ -65,7 +65,7 @@ From:    foo@example.edu
 Subject: test
 
 
-part       text/plain                  70
+[ part  - text/plain -   70B  ]
 
 This is a multi-part message in MIME format.
 
index efcab90..960af71 100755 (executable)
@@ -18,8 +18,6 @@ setup_test
 
 LC_ALL=en_US.UTF-8; export LC_ALL
 
-test "$ICONV_ENABLED" -eq 0  &&  text_size=10  || text_size=11
-
 expected=$MH_TEST_DIR/$$.expected
 actual=$MH_TEST_DIR/$$.actual
 
@@ -35,6 +33,7 @@ Subject: test
 MIME-Version: 1.0
 Content-Type: text/plain; charset=windows-1252
 Content-Transfer-Encoding: quoted-printable
+Content-Description: bogus quoted-printable data
 Date: Sun, 18 Dec 2005 00:52:39 +0100
 
 4 =F7 2 =3D 2
@@ -47,8 +46,9 @@ From:    foo@example.edu
 Subject: test
 
 MIME-Version: 1.0
+Content-Description: bogus quoted-printable data
 
-part       text/plain                  $text_size
+[ part  - text/plain - bogus quoted-printable data  11B  ]
 This is a test
 EOF
 
index ce9045b..fdf1ca7 100755 (executable)
@@ -43,7 +43,7 @@ Subject: test
 MIME-Version: 1.0
 Content-Disposition: inline
 
-part       text/plain                  34
+[ part  - text/plain -   34B  ]
 This is a test; this is the body.
 EOF
 run_prog mhshow $msgnum > $actual 2>&1
index 684a538..b003053 100755 (executable)
@@ -153,7 +153,7 @@ EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
-part 1.1   text/plain                  29
+[ part 1.1 - text/plain -   29B  ]
 This is the text/plain part.
 EOF
 
@@ -293,7 +293,7 @@ EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
-part 1.1   text/plain                  29
+[ part 1.1 - text/plain -   29B  ]
 This is the text/plain part.
 EOF
 
@@ -371,6 +371,7 @@ The 4096'th character is the '2' at the end of the following NextPart_002.
 --NextPart_002
 Content-Type: text/plain;
     charset="utf-8"
+Content-Description: the text/plain part
 
 This is the text/plain part.
 
@@ -381,7 +382,7 @@ EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
-part 1.1   text/plain                  29
+[ part 1.1 - text/plain - the text/plain part  29B  ]
 This is the text/plain part.
 EOF
 
index db3e073..dae70a5 100755 (executable)
@@ -54,7 +54,7 @@ Subject: test
 
 MIME-Version: 1.0
 
-part       text/plain                 181
+[ part  - text/plain -   181B  ]
 =
 =
 ignored space at end
index 2fb74b4..9739c48 100755 (executable)
@@ -51,7 +51,7 @@ EOF
 
 # Write the expected output.
 cat > $expected <<EOF
-part 1.1   text/plain                  29
+[ part 1.1 - text/plain -   29B  ]
 This is the text/plain part.
 EOF
 
index 61522c4..a66db46 100755 (executable)
@@ -47,7 +47,7 @@ Subject: test display with charset conversion
 
 MIME-Version: 1.0
 
-part       text/plain                  11
+[ part  - text/plain -   11B  ]
 4 รท 2 = 2
 EOF
 
@@ -735,7 +735,7 @@ Subject: check charset conversion of a large file
 
 MIME-Version: 1.0
 
-part       text/plain                 18K
+[ part  - text/plain -   18.9KB  ]
 1.  The Earthquake