2 ######################################################
4 # Test forwarding messages (including RFC-934 mode).
6 ######################################################
8 if test -z "${MH_OBJ_DIR}"; then
9 srcdir=`dirname "$0"`/../..
10 MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
13 . "$MH_OBJ_DIR/test/common.sh"
17 # Make a draft file forwarding two messages.
25 #forw [forwarded messages] +inbox 1 2
29 # Munge the Content-Id from the draft after mhbuild, so we have a reliable
32 sed 's/\(Content-ID:\) <[^>][^>]*>/\1 <TESTID>/' $draft > $actual
35 draft="$MH_TEST_DIR/$$.draft"
36 draftorig="$MH_TEST_DIR/,$$.draft.orig"
37 expected="$MH_TEST_DIR/$$.expected"
38 actual="$MH_TEST_DIR/$$.actual"
47 Content-Type: multipart/digest; boundary="----- =_aaaaaaaaaa0"
49 Content-Description: forwarded messages
52 Content-Type: message/rfc822
54 From: Test1 <test1@example.com>
55 To: Some User <user@example.com>
56 Date: Fri, 29 Sep 2006 00:00:00
57 Subject: Testing message 1
59 This is message number 1
62 Content-Type: message/rfc822
64 From: Test2 <test2@example.com>
65 To: Some User <user@example.com>
66 Date: Fri, 29 Sep 2006 00:00:00
67 Subject: Testing message 2
69 This is message number 2
71 ------- =_aaaaaaaaaa0--
76 check $expected $actual
77 test ${failed:-0} -eq 0 && rm "$draft" "$draftorig"
79 # check mhbuild -rfc934
86 Content-Type: multipart/digest; boundary="----- =_aaaaaaaaaa0"
88 Content-Description: forwarded messages
93 From: Test1 <test1@example.com>
94 To: Some User <user@example.com>
95 Date: Fri, 29 Sep 2006 00:00:00
96 Subject: Testing message 1
98 This is message number 1
100 ------- =_aaaaaaaaaa0
102 From: Test2 <test2@example.com>
103 To: Some User <user@example.com>
104 Date: Fri, 29 Sep 2006 00:00:00
105 Subject: Testing message 2
107 This is message number 2
109 ------- =_aaaaaaaaaa0--
112 mhbuild -rfc934 $draft
114 check $expected $actual
115 test ${failed:-0} -eq 0 && rm "$draft" "$draftorig"