#!/bin/sh ###################################################### # # Test the use of the Attach: header # ###################################################### 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 draft="$MH_TEST_DIR/$$.draft" expected="$MH_TEST_DIR/$$.expected" actual="$MH_TEST_DIR/$$.actual" # # Test out a simple draft, one part. # cat > "$draft" < cc: Fcc: +outbox Attach: ${srcdir}/test/mhbuild/tiny.jpg ------ EOF mhbuild "$draft" cat > "$actual" < cc: Fcc: +outbox MIME-Version: 1.0 Content-Type: image/jpeg; name="tiny.jpg" Content-Description: tiny.jpg Content-Disposition: attachment; filename="tiny.jpg" Content-Transfer-Encoding: base64 /9g= EOF check "$draft" "$actual" # # Check out more common case, one (or more) attachments # along with message text. # cat > "$draft" < cc: Fcc: +outbox Attach: ${srcdir}/test/mhbuild/tiny.jpg ------ This is a test EOF mhbuild "$draft" cat "$draft" # # Two parts, one attachment # exit ${failed:-0}