2 ######################################################
6 ######################################################
14 runandcheck "prompter -help" <<!
15 Usage: prompter [switches] file
28 * ) printf '%s: prompter -v generated unexpected output\n' "$0" >&2
29 failed=`expr ${failed:-0} + 1`;;
32 # check unknown switch
33 runandcheck 'prompter -nonexistent' <<!
34 prompter: -nonexistent unknown
39 # check with no switches
41 runandcheck 'prompter' <<!
42 prompter: usage: prompter [switches] file
49 cat >$MH_TEST_DIR/prompter-file <<EOF
50 Resent-From: sender@example.com
56 printf 'recipient@example.com\ncc@example.com\n+outbox\nmessage body\n' | \
57 prompter $MH_TEST_DIR/prompter-file >/dev/null
59 runandcheck "cat $MH_TEST_DIR/prompter-file" <<!
60 Resent-From: sender@example.com
61 Resent-To: recipient@example.com
62 Resent-cc: cc@example.com
72 cat >$MH_TEST_DIR/prompter-file <<EOF
73 Resent-From: sender@example.com
81 printf 'recipient@example.com\ncc@example.com\n+outbox\nappendage\n' | \
82 prompter -noprepend $MH_TEST_DIR/prompter-file >/dev/null
84 runandcheck "cat $MH_TEST_DIR/prompter-file" <<!
85 Resent-From: sender@example.com
86 Resent-To: recipient@example.com
87 Resent-cc: cc@example.com
97 cat >$MH_TEST_DIR/prompter-file <<EOF
98 Resent-From: sender@example.com
106 printf 'recipient@example.com\ncc@example.com\n+outbox\nprependage\n' | \
107 prompter -noprepend -prepend $MH_TEST_DIR/prompter-file >/dev/null
109 runandcheck "cat $MH_TEST_DIR/prompter-file" <<!
110 Resent-From: sender@example.com
111 Resent-To: recipient@example.com
112 Resent-cc: cc@example.com
122 runandcheck "</dev/null prompter -rapid $MH_TEST_DIR/prompter-file" <<!
123 Resent-From: sender@example.com
124 Resent-To: recipient@example.com
125 Resent-cc: cc@example.com
127 --------Enter initial text
135 runandcheck "</dev/null prompter -rapid -norapid $MH_TEST_DIR/prompter-file" <<!
136 Resent-From: sender@example.com
137 Resent-To: recipient@example.com
138 Resent-cc: cc@example.com
140 --------Enter initial text
150 runandcheck "echo 'woot woot' | prompter -nobody -body $MH_TEST_DIR/prompter-file" <<!
151 Resent-From: sender@example.com
152 Resent-To: recipient@example.com
153 Resent-cc: cc@example.com
155 --------Enter initial text
161 runandcheck "cat $MH_TEST_DIR/prompter-file" <<!
162 Resent-From: sender@example.com
163 Resent-To: recipient@example.com
164 Resent-cc: cc@example.com