]>
diplodocus.org Git - nmh/blob - test/comp/test-comp-format
3 # Tests to see if the -from, -to, -cc, -fcc, and -subject switches to
4 # "comp" work correctly.
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"
17 # Create a test template file (we create one here just in case the master
21 form
="${MH_TEST_DIR}/$$.components"
23 %(void{from})%(void(width))%(putaddr From: )
24 %(void{to})%(void(width))%(putaddr To: )
25 %(void{cc})%(void(width))%(putaddr cc: )
31 expected
="${MH_TEST_DIR}/$$.expected"
32 actual
="${MH_TEST_DIR}/Mail/draft"
33 from
="Mr Test User <test@example.com>"
34 to1
="User One <userone@example.com>"
35 to2
="User Two <usertwo@example.com>"
36 cc1
="CC User One <ccuserone@example.com>"
37 cc2
="CC User Two <ccusertwo@example.com>"
38 cc3
="CC User Three <ccuserthree@example.com>"
39 cc4
="CC User Four <ccuserfour@example.com>"
41 fcc2
="+nosuchmailbox2"
42 subject
="Totally bogus subject"
58 comp
-editor true
-form "${form}" -from "${from}" -to "${to1}" -to "${to2}" \
59 -cc "${cc1}" -cc "${cc2}" -cc "${cc3}" -cc "${cc4}" -fcc "${fcc1}" \
60 -fcc "${fcc2}" -subject "${subject}" -width 60 -nowhatnowproc || exit 1
62 check
"${expected}" "${actual}"
64 test "${failed:-0}" -eq 0 && rm "${form}"