3 # See if we handle multiple components of the same name correctly.
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 # create test replcomps
18 form="$MH_TEST_DIR/$$.replcomps"
20 From: Nowhere User <nowhere@example.com>
21 %(lit)%(formataddr %<{reply-to}%?{from}%>)\
22 %<(nonnull)%(void(width))%(putaddr To: )\n%>\
23 %(lit)%(formataddr{cc})\
24 %<(nonnull)%(void(width))%(putaddr cc: )\n%>\
25 %<{subject}Subject: Re: %{subject}\n%>\
29 cat > "${MH_TEST_DIR}/Mail/inbox/11" <<EOF
30 From: Test1 <test1@example.com>
31 To: Nowhere User <nowhere@example.com>
32 cc: Mister User One <mruserone@example.com>
33 Subject: This is a subject
34 cc: Mister User Two <mrusertwo@example.com>
35 Subject: that got continued on another line
36 Date: 28 Sep 2006 03:04:05 -0400
38 This is a new test message
41 expected="$MH_TEST_DIR/$$.expected"
42 actual="$MH_TEST_DIR/Mail/draft"
44 cat > "$expected" <<EOF
45 From: Nowhere User <nowhere@example.com>
46 To: Test1 <test1@example.com>
47 cc: Mister User One <mruserone@example.com>,
48 Mister User Two <mrusertwo@example.com>
49 Subject: Re: This is a subject that got continued on another line
52 > This is a new test message
55 repl -editor true -cc cc -format -form $form -width 72 -nowhatnowproc 11 \
58 check "$expected" "$actual"
60 test ${failed:-0} -eq 0 && rm "$form"