3 # Tests to see if "forw -digest" works correctly.
6 if test -z "${MH_OBJ_DIR}"; then
7 srcdir=`dirname "$0"`/../..
8 MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
11 . "$MH_OBJ_DIR/test/common.sh"
15 expected="${MH_TEST_DIR}/$$.expected"
16 actual="${MH_TEST_DIR}/Mail/draft"
17 from="Mr Test User <test@example.com>"
18 to1="User One <userone@example.com>"
19 to2="User Two <usertwo@example.com>"
20 cc1="CC User One <ccuserone@example.com>"
21 cc2="CC User Two <ccusertwo@example.com>"
22 cc3="CC User Three <ccuserthree@example.com>"
23 cc4="CC User Four <ccuserfour@example.com>"
25 fcc2="+nosuchmailbox2"
27 digestdate=$(date "+%A, %e %b %Y")
29 cat > "$expected" <<EOF
38 Subject: digest-test Digest V2 #3
41 digest-test Digest $digestdate
46 ------------------------------------------------------------
53 filename=$(mhpath +inbox $i)
54 cat $filename >> "$expected"
55 cat >> "$expected" <<EOF
57 ------------------------------
63 cat >> "$expected" <<EOF
64 End of digest-test Digest [Volume 2 Issue 3]
65 ********************************************
68 forw -editor true -from "${from}" -to "${to1}" -to "${to2}" \
69 -cc "${cc1}" -cc "${cc2}" -cc "${cc3}" -cc "${cc4}" -fcc "${fcc1}" \
70 -fcc "${fcc2}" -width 60 -issue 3 -volume 2 -nowhatnowproc \
71 -digest digest-test +inbox 1-6 || exit 1
73 check "${expected}" "${actual}"
78 # Once more, but taking some of the defaults
81 cat > "$expected" <<EOF
83 To: digest-test Distribution: dist-digest-test;
84 Subject: This is a test
87 digest-test Digest ${digestdate}
92 ------------------------------------------------------------
99 filename=$(mhpath +inbox $i)
100 cat $filename >> "$expected"
101 cat >> "$expected" <<EOF
103 ------------------------------
109 cat >> "$expected" <<EOF
110 End of digest-test Digest [Volume 2 Issue 4]
111 ********************************************
114 forw -editor true -from "${from}" -nowhatnowproc -digest digest-test \
115 -subject "This is a test" +inbox 7-8 || exit 1
117 check "${expected}" "${actual}"