From: Paul Fox Date: Wed, 4 Feb 2015 19:44:36 +0000 (-0500) Subject: test-subpart: add mhlist and mhshow tests for -type/-part/-prefer X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/69b67b6827ed4408749cb66af9ea7613e0a22d93?ds=sidebyside test-subpart: add mhlist and mhshow tests for -type/-part/-prefer --- diff --git a/test/mhlist/test-mhlist b/test/mhlist/test-mhlist index d14475c3..e5fc895c 100755 --- a/test/mhlist/test-mhlist +++ b/test/mhlist/test-mhlist @@ -220,6 +220,7 @@ cat > $expected < $msgfile < $actual 2>&1 check $expected $actual +## now check mhlist output + +msgfile=`mhpath new` +msgnum=`basename $msgfile` +cat > $msgfile < +Subject: mhlist test +Date: Thu, 29 Jan 2015 18:12:21 +0000 (GMT) +Content-Type: multipart/mixed; boundary="BoundaryMixed" + +--BoundaryMixed +Content-type: multipart/alternative; + boundary="BoundaryAlternative1" + +--BoundaryAlternative1 +Content-type: text/enriched; CHARSET=US-ASCII +Content-transfer-encoding: 7bit + +This is supposedly enriched. + +--BoundaryAlternative1 +Content-type: text/plain; charset=ISO-8859-1; format=flowed +Content-transfer-encoding: 8bit + +This is the body text/plain part. + +--BoundaryAlternative1 +Content-type: text/html; CHARSET=US-ASCII +Content-transfer-encoding: 7bit + +
+This is the text/html body part. +
+ +--BoundaryAlternative1-- + +--BoundaryMixed +Content-type: multipart/alternative; + boundary="BoundaryAlternative2" + +--BoundaryAlternative2 +Content-type: audio/wav +Content-transfer-encoding: 8bit + +pretend wav audio + +--BoundaryAlternative2 +Content-type: audio/mp3 +Content-transfer-encoding: 8bit + +pretend mp3 audio + +--BoundaryAlternative2 +Content-type: audio/basic +Content-transfer-encoding: 8bit + +pretend basic audio + +--BoundaryAlternative2-- + +--BoundaryMixed-- +EOF + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + exit $failed diff --git a/test/mhshow/test-subpart b/test/mhshow/test-subpart index 9739c48d..161dceab 100755 --- a/test/mhshow/test-subpart +++ b/test/mhshow/test-subpart @@ -59,4 +59,114 @@ EOF run_prog mhshow -part 1.1 -form mhl.null $msgnum > $actual 2>&1 check "$expected" "$actual" +cat > $msgfile < +Subject: mhshow -part/-type/prefer test +Date: Thu, 29 Jan 2015 18:12:21 +0000 (GMT) +Content-Type: multipart/mixed; boundary="BoundaryMixed" + +--BoundaryMixed +Content-type: multipart/alternative; + boundary="BoundaryAlternative1" + +--BoundaryAlternative1 +Content-type: text/plain; charset=ISO-8859-1; format=flowed +Content-transfer-encoding: 8bit + +This is the body text/plain part. +--BoundaryAlternative1 +Content-type: multipart/related; + boundary="BoundaryAlternative2"; type="text/html" + +--BoundaryAlternative2 +Content-type: text/html; CHARSET=US-ASCII +Content-transfer-encoding: quoted-printable + +
+This is the text/html body part. +
+ +--BoundaryAlternative2-- + +--BoundaryAlternative1-- + +--BoundaryMixed +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +_______________________________________________ +This is the final text/plain signature part. + +--BoundaryMixed-- +EOF + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + +# Write the expected output. +cat > $expected < $actual 2>&1 +check "$expected" "$actual" + exit $failed