2 ######################################################
6 ######################################################
8 # This is not a comprehensive test of repl, but some day it will be :-)
13 if test -z "${MH_OBJ_DIR}"; then
14 srcdir=`dirname $0`/../..
15 MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR
18 . "$MH_OBJ_DIR/test/common.sh"
22 expected=$MH_TEST_DIR/$$.expected
23 actual=$MH_TEST_DIR/Mail/draft
28 Usage: repl: [+folder] [msg] [switches]
58 repl -help >$actual 2>&1
59 check $expected $actual
64 * ) printf '%s: repl -v generated unexpected output\n' "$0" >&2
65 failed=`expr ${failed:-0} + 1`;;
68 # check unknown switch
69 run_test "repl -nonexistent" 'repl: -nonexistent unknown'
71 # check with no switches
72 run_test "repl" 'repl: no cur message'
75 printf 'Local-Mailbox: mymailbox@localhost\n' >> $MH
79 From: mymailbox@localhost
80 To: Test1 <test1@example.com>
81 cc: mymailbox@localhost
83 Subject: Re: Testing message 1
84 In-reply-to: 1@test.nmh
85 References: 1@test.nmh
86 Comments: In-reply-to Test1 <test1@example.com>
87 message dated "Fri, 29 Sep 2006 00:00:00."
91 repl -cc me -editor true -nowhatnowproc 1
92 check $expected $actual
96 From: mymailbox@localhost
97 To: Test1 <test1@example.com>
100 Subject: Re: Testing message 1
101 In-reply-to: 1@test.nmh
102 References: 1@test.nmh
103 Comments: In-reply-to Test1 <test1@example.com>
104 message dated "Fri, 29 Sep 2006 00:00:00."
108 repl -cc me -nocc me -editor true -nowhatnowproc 1
109 check $expected $actual
111 # check -cc me with Local- and Alternate-Mailbox addtions, Bug #36635:
112 # -nocc me doesn't account for Alternate-Mailboxes.
113 printf 'Alternate-Mailboxes: user@example.com\n' >> $MH
116 From: mymailbox@localhost
117 To: Test1 <test1@example.com>
118 cc: mymailbox@localhost
120 Subject: Re: Testing message 1
121 In-reply-to: 1@test.nmh
122 References: 1@test.nmh
123 Comments: In-reply-to Test1 <test1@example.com>
124 message dated "Fri, 29 Sep 2006 00:00:00."
128 repl -cc me -editor true -nowhatnowproc 1
129 check $expected $actual
132 # check -nocc me with Local- and Alternate-Mailbox addtions, Bug #36635:
133 # -nocc me doesn't account for Alternate-Mailboxes.
135 From: mymailbox@localhost
136 To: Test1 <test1@example.com>
139 Subject: Re: Testing message 1
140 In-reply-to: 1@test.nmh
141 References: 1@test.nmh
142 Comments: In-reply-to Test1 <test1@example.com>
143 message dated "Fri, 29 Sep 2006 00:00:00."
147 repl -cc me -nocc me -editor true -nowhatnowproc 1
148 check $expected $actual