# This file is part of GNU Mailutils. -*- Autotest -*- # Copyright (C) 2010-2012, 2014-2017 Free Software Foundation, Inc. # # GNU Mailutils is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3, or (at # your option) any later version. # # GNU Mailutils is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Mailutils. If not, see . AT_BANNER(comp) m4_pushdef([MH_KEYWORDS],[comp]) m4_pushdef([compcmd],[comp -editor $abs_top_srcdir/mh/tests/mhed]) MH_CHECK([comp -file],[comp00 comp-file],[ echo quit | compcmd -file $HOME/infile | cwdrepl | sed 's/ *$//' sed 's/ *$//' infile ], [0], [-- Editor invocation: ./infile -- Input file: To: cc: Subject: -------- -- Input file end What now? draft left on "./infile". To: cc: Subject: -------- Seen by mhed ]) MH_CHECK([comp -file (del)],[comp01 comp-file_del],[ echo 'quit -delete' | compcmd -file $HOME/infile | cwdrepl | sed 's/ *$//' ], [0], [-- Editor invocation: ./infile -- Input file: To: cc: Subject: -------- -- Input file end What now? ]) MH_CHECK([comp file],[comp02 comp_file],[ echo 'quit' | compcmd file | cwdrepl | sed 's/ *$//' sed 's/ *$//' Mail/file ], [0], [-- Editor invocation: ./Mail/file -- Input file: To: cc: Subject: -------- -- Input file end What now? draft left on "./Mail/file". To: cc: Subject: -------- Seen by mhed ]) MH_CHECK([comp -use file],[comp03 comp-use_file],[ AT_DATA([Mail/file],[From: gray To: root Subject: test input message body ]) echo 'quit' | compcmd -use file | cwdrepl | sed 's/ *$//' sed 's/ *$//' Mail/file ], [0], [-- Editor invocation: ./Mail/file -- Input file: From: gray To: root Subject: test input message body -- Input file end What now? draft left on "./Mail/file". From: gray To: root Subject: test input message body Seen by mhed ]) MH_CHECK([comp +folder msg],[comp04 comp+folder_msg],[ mkdir Mail/inbox AT_DATA([Mail/inbox/1],[From: gray To: root Subject: test input message body ]) echo 'quit' | compcmd +inbox 1 | cwdrepl | sed 's/ *$//' echo Mail/draft sed 's/ *$//' Mail/draft echo Message sed 's/ *$//' Mail/inbox/1 ], [0], [-- Editor invocation: ./Mail/draft -- Input file: From: gray To: root Subject: test input message body -- Input file end What now? draft left on "./Mail/draft". Mail/draft From: gray To: root Subject: test input message body Seen by mhed Message From: gray To: root Subject: test input message body ]) MH_CHECK([comp -draftfolder],[comp05 comp-draftfolder draftfolder],[ mkdir Mail/drafts echo 'quit' | compcmd -draftfolder drafts | cwdrepl | sed 's/ *$//' 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([comp +draftfolder -use],[comp06 comp-draftfolder-use draftfolder],[ mkdir Mail/drafts AT_DATA([Mail/drafts/1],[From: gray To: root Subject: test input message body ]) echo "cur: 1" > Mail/drafts/.mh_sequences echo 'quit' | compcmd -draftfolder drafts -use| cwdrepl | sed 's/ *$//' sed 's/ *$//' Mail/drafts/1 ], [0], [-- Editor invocation: ./Mail/drafts/1 -- Input file: From: gray To: root Subject: test input message body -- Input file end What now? draft left on "./Mail/drafts/1". From: gray To: root Subject: test input message body Seen by mhed ]) m4_popdef([compcmd]) m4_popdef([MH_KEYWORDS]) # End of comp.at