+#!/bin/sh
+#
+# Test of various (well, start with one) function escapes.
+
+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
+mhl="${MH_LIB_DIR}/mhl"
+expected="$MH_TEST_DIR/$$.expected"
+actual="$MH_TEST_DIR/$$.actual"
+
+cat >`mhpath new` <<EOF
+MIME-Version: 1.0
+From: sender@example.com
+To: recipient@example.com
+Subject: message with blank lines
+Date: Mon, 29 Apr 2013 11:51:45 -0400
+
+There are two blank lines below. And there is a trailing space:
+And another trailing space:
+
+
+EOF
+
+
+# check that blank lines don't end with whitepace
+cat >"$expected" <<EOF
+> There are two blank lines below. And there is a trailing space:
+> And another trailing space:
+>
+>
+EOF
+
+cat >"$MH_TEST_DIR/test.format" <<EOF
+body:component="> ",overflowtext=,overflowoffset=0
+EOF
+
+"$mhl" -nomoreproc -form "$MH_TEST_DIR/test.format" `mhpath last` >"$actual"
+check "$expected" "$actual"
+
+
+rm -f "$MH_TEST_DIR/test.format"
+exit $failed