X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/86d3f54edebc4ed9f923b6b8ef175aebdc60989b..ef1ba39e8dae81091b6c3e73e72825ef6edea3c6:/test/mhlist/test-mhlist?ds=inline diff --git a/test/mhlist/test-mhlist b/test/mhlist/test-mhlist index b1d59d10..e5fc895c 100755 --- a/test/mhlist/test-mhlist +++ b/test/mhlist/test-mhlist @@ -29,26 +29,26 @@ cat > $expected < $actual 2>&1 +run_prog mhlist > $actual 2>&1 check $expected $actual 'keep first' # check -noheaders run_test 'mhlist 5 -noheaders' ' 5 text/plain 25' # check -headers -mhlist -noheaders -headers > $actual 2>&1 +run_prog mhlist -noheaders -headers > $actual 2>&1 check $expected $actual 'keep first' # check with folder and current message -mhlist +inbox > $actual 2>&1 +run_prog mhlist +inbox > $actual 2>&1 check $expected $actual 'keep first' # check with specified message -mhlist 5 > $actual 2>&1 +run_prog mhlist 5 > $actual 2>&1 check $expected $actual 'keep first' # check -file -mhlist -file "$MH_TEST_DIR/Mail/inbox/5" > $actual 2>&1 +run_prog mhlist -file "$MH_TEST_DIR/Mail/inbox/5" > $actual 2>&1 check $expected $actual # check -file - @@ -56,7 +56,7 @@ cat > $expected < $actual 2>&1 +run_prog mhlist -file - < "$MH_TEST_DIR/Mail/inbox/5" > $actual 2>&1 check $expected $actual # check message number greater than highest @@ -68,7 +68,7 @@ cat > $expected < $actual 2>&1 +run_prog mhlist 2 8 > $actual 2>&1 check $expected $actual # Write message with a text/plain subpart. @@ -220,6 +220,7 @@ cat > $expected < $msgfile < $actual 2>&1 +run_prog mhlist last > $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