summaryrefslogtreecommitdiff
path: root/mh/tests/comp.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2017-06-11 00:29:06 +0300
committerSergey Poznyakoff <gray@gnu.org>2017-06-11 00:29:06 +0300
commitfe90e86dac8c9c91a35347ee5bb4513195263ee2 (patch)
tree2fdb185baa9e0807641147881adf302e5aa39ea6 /mh/tests/comp.at
parent263e2e9f9fcf721c11a61a16dca4cb38d6385fe9 (diff)
downloadmailutils-fe90e86dac8c9c91a35347ee5bb4513195263ee2.tar.gz
mailutils-fe90e86dac8c9c91a35347ee5bb4513195263ee2.tar.bz2
Fix the -nodraftfolder and -nowhatnowproc options.
The commit 744c4a9c didn't take into account the -nodraftfolder and -nowhatnowproc options, which can be used to cancel the effect of the corresponding facilities. This commit fixes it. * mh/mh_getopt.c (mh_getopt_ext): New function. * mh/mh_getopt.h (mh_getopt_ext): New prototype. (mh_optinit): New struct. * mh/tests/comp.at: Test the use of Draft-Folder * mh/tests/forw.at: Likewise. * mh/tests/repl.at: Likewise. * mh/comp.c (main): use mh_getopt_ext to properly process draftfolder and whatnowproc. * mh/forw.c: Likewise. * mh/repl.c: Likewise. * mh/mh.h (mh_whom): Remove. (mh_whom_header, mh_whom_file, mh_whom_message): New protos. * mh/mh_alias.y (mh_read_aliases): Don't read aliases twice. * mh/mh_whatnow.c (whom): Use mh_whom_file. * mh/mh_whom.c (mh_whom): Rewrite and rename to mh_whom_file. (mh_whom_header, mh_whom_message): New functions. * mh/whom.c: Use mh_getopt_ext. Interpret command line arguments, depending on whether the draftfile facility is in use.
Diffstat (limited to 'mh/tests/comp.at')
-rw-r--r--mh/tests/comp.at43
1 files changed, 43 insertions, 0 deletions
diff --git a/mh/tests/comp.at b/mh/tests/comp.at
index 563310cca..7a63e5ff7 100644
--- a/mh/tests/comp.at
+++ b/mh/tests/comp.at
@@ -193,6 +193,49 @@ message body
Seen by mhed
])
+MH_CHECK([use Draft-Folder],[comp07 draftfolder],
+[mkdir Mail/drafts
+echo "Draft-Folder: +drafts" >> $MH
+echo 'quit' | compcmd | cwdrepl
+sed 's/ *$//' Mail/drafts/1
+],
+[0],
+[-- Editor invocation: ./Mail/drafts/1
+-- Input file:
+To:
+cc:
+Subject:
+--------
+-- Input file end
+What now? draft left on "./Mail/drafts/1".
+To:
+cc:
+Subject:
+--------
+Seen by mhed
+])
+
+MH_CHECK([-nodraftfolder],[comp08 nodraftfolder draftfolder],
+[mkdir Mail/drafts
+echo "Draft-Folder: +drafts" >> $MH
+echo 'quit' | compcmd -nodraftfolder | cwdrepl
+sed 's/ *$//' Mail/draft
+],
+[0],
+[-- Editor invocation: ./Mail/draft
+-- Input file:
+To:
+cc:
+Subject:
+--------
+-- Input file end
+What now? draft left on "./Mail/draft".
+To:
+cc:
+Subject:
+--------
+Seen by mhed
+])
m4_popdef([compcmd])
m4_popdef([MH_KEYWORDS])

Return to:

Send suggestions and report system problems to the System administrator.