. "$MH_OBJ_DIR/test/common.sh"
setup_test
-mhl="${MH_LIB_DIR}/mhl"
+mhl="${MH_LIBEXEC_DIR}/mhl"
expected="$MH_TEST_DIR/$$.expected"
actual="$MH_TEST_DIR/$$.actual"
MIME-Version: 1.0
From: sender@example.com
To: recipient@example.com
-Subject: message with blank lines
+Subject: message with blank lines and trailing spaces
Date: Mon, 29 Apr 2013 11:51:45 -0400
There are two blank lines below. And there is a trailing space:
EOF
-# check that blank lines don't end with whitepace
+# check nortrim (default), and that trailing whitespace in a
+# component is trimmed when filtering blank lines
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
+body:component="> "
+EOF
+
+"$mhl" -nomoreproc -form "$MH_TEST_DIR/test.format" `mhpath last` >"$actual"
+check "$expected" "$actual"
+
+
+# check rtrim
+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="> ",rtrim
EOF
"$mhl" -nomoreproc -form "$MH_TEST_DIR/test.format" `mhpath last` >"$actual"
rm -f "$MH_TEST_DIR/test.format"
+
exit $failed