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 Comments: In-reply-to Test1 <test1@example.com>
85 message dated "Fri, 29 Sep 2006 00:00:00."
89 repl -cc me -editor true -nowhatnowproc 1
90 check $expected $actual
94 From: mymailbox@localhost
95 To: Test1 <test1@example.com>
98 Subject: Re: Testing message 1
99 Comments: In-reply-to Test1 <test1@example.com>
100 message dated "Fri, 29 Sep 2006 00:00:00."
104 repl -cc me -nocc me -editor true -nowhatnowproc 1
105 check $expected $actual
107 # check -cc me with Local- and Alternate-Mailbox addtions, Bug #36635:
108 # -nocc me doesn't account for Alternate-Mailboxes.
109 printf 'Alternate-Mailboxes: user@example.com\n' >> $MH
112 From: mymailbox@localhost
113 To: Test1 <test1@example.com>
114 cc: mymailbox@localhost
116 Subject: Re: Testing message 1
117 Comments: In-reply-to Test1 <test1@example.com>
118 message dated "Fri, 29 Sep 2006 00:00:00."
122 repl -cc me -editor true -nowhatnowproc 1
123 check $expected $actual
126 # check -nocc me with Local- and Alternate-Mailbox addtions, Bug #36635:
127 # -nocc me doesn't account for Alternate-Mailboxes.
129 From: mymailbox@localhost
130 To: Test1 <test1@example.com>
133 Subject: Re: Testing message 1
134 Comments: In-reply-to Test1 <test1@example.com>
135 message dated "Fri, 29 Sep 2006 00:00:00."
139 repl -cc me -nocc me -editor true -nowhatnowproc 1
140 check $expected $actual