#!/bin/sh ###################################################### # # Test show of one part, fixed by # 31cba404636730df219dd009ca5893ccc56d46af # ###################################################### set -e if test -z "${MH_OBJ_DIR}"; then srcdir=`dirname "$0"`/../.. MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR fi . "$MH_OBJ_DIR/test/common.sh" setup_test expected=$MH_TEST_DIR/$$.expected actual=$MH_TEST_DIR/$$.actual # Write message with a text/plain subpart. msgfile=`mhpath new` msgnum=`basename $msgfile` cat > $msgfile < $expected < $actual 2>&1 check "$expected" "$actual" : part 1.1 # tests of -part/-type/-prefer 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=US-ASCII; 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" : part 1.1.1 # Write the expected output. cat > $expected < $actual 2>&1 check "$expected" "$actual" : part 1.2 # Write the expected output. cat > $expected < $actual 2>&1 check "$expected" "$actual" : part conflicting text/plain, part 1 switches # Write the expected output. cat > $expected < $actual 2>&1 check "$expected" "$actual" : part 2 # Write the expected output. cat > $expected < $actual 2>&1 check "$expected" "$actual" : type text/plain # Write the expected output. cat > $expected < $actual 2>&1 check "$expected" "$actual" : prefer text/plain exit $failed