]>
diplodocus.org Git - nmh/blob - test/mhl/test-mhl-flags
3 # Test of various (well, start with one) function escapes.
7 if test -z "${MH_OBJ_DIR}"; then
8 srcdir
=`dirname "$0"`/..
/..
9 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
12 .
"$MH_OBJ_DIR/test/common.sh"
15 mhl
="${MH_LIBEXEC_DIR}/mhl"
17 MHLDEBUG
=foo check_exit
'-eq 1' "$mhl" -
19 check_exit
'-eq 1' "$mhl" -xyzzy
20 check_exit
'-eq 0' "$mhl" -help
21 check_exit
'-eq 0' "$mhl" -version
22 check_exit
'-eq 1' "$mhl" -bell -nobell -clear -
23 check_exit
'-eq 1' "$mhl" -folder
24 check_exit
'-eq 1' "$mhl" -folder + -
25 check_exit
'-eq 1' "$mhl" -form
26 check_exit
'-eq 1' "$mhl" -sleep
27 check_exit
'-eq 1' "$mhl" -sleep 42 -
28 check_exit
'-eq 1' "$mhl" -moreproc foo
-moreproc
29 check_exit
'-eq 1' "$mhl" -nofmtproc -fmtproc foo
-fmtproc
30 check_exit
'-eq 1' "$mhl" -length 42 -length
31 check_exit
'-eq 1' "$mhl" -length 0
32 check_exit
'-eq 1' "$mhl" -width
33 check_exit
'-eq 1' "$mhl" -digest foo
-width 0
34 check_exit
'-eq 1' "$mhl" -issue 42 -digest
35 check_exit
'-eq 1' "$mhl" -issue
36 check_exit
'-eq 1' "$mhl" -volume 42 -issue 0
37 check_exit
'-eq 1' "$mhl" -volume
38 check_exit
'-eq 1' "$mhl" -forwall -volume 0
39 check_exit
'-eq 0' "$mhl" -dashstuffing -nodashstuffing \
41 check_exit
'-eq 0' "$mhl" -forwall -digest foo \
42 -bell -length 1 -width 1 </dev
/null
43 check_exit
'-eq 0' "$mhl" -forwall -digest foo \
44 -nobell -volume 1 -clear </dev
/null
46 expected
="$MH_TEST_DIR/$$.expected"
47 actual
="$MH_TEST_DIR/$$.actual"
49 cat >`mhpath new` <<EOF
51 From: sender@example.com
52 To: recipient@example.com
53 Subject: message with blank lines and trailing spaces
54 Date: Mon, 29 Apr 2013 11:51:45 -0400
56 There are two blank lines below. And there is a trailing space:
57 And another trailing space:
63 # check nortrim (default), and that trailing whitespace in a
64 # component is trimmed when filtering blank lines
65 cat >"$expected" <<EOF
66 > There are two blank lines below. And there is a trailing space:
67 > And another trailing space:
72 cat >"$MH_TEST_DIR/test.format" <<EOF
76 "$mhl" -nomoreproc -form "$MH_TEST_DIR/test.format" `mhpath last` >"$actual"
77 check
"$expected" "$actual"
81 cat >"$expected" <<EOF
82 > There are two blank lines below. And there is a trailing space:
83 > And another trailing space:
88 cat >"$MH_TEST_DIR/test.format" <<EOF
89 body:component="> ",rtrim
92 "$mhl" -nomoreproc -form "$MH_TEST_DIR/test.format" `mhpath last` >"$actual"
93 check
"$expected" "$actual"
96 rm -f "$MH_TEST_DIR/test.format"