summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-07-27 09:45:57 +0300
committerSergey Poznyakoff <gray@gnu.org>2021-07-27 10:33:23 +0300
commitd9201c84c6b03586cebff3a1f68ad1fa550ce180 (patch)
tree0eefefaaa8bc5a8c318308d02acd0334a961e56c
parent3a9dd1123b71a7dcec93aae16e5da1beb6f41019 (diff)
downloadmailutils-d9201c84c6b03586cebff3a1f68ad1fa550ce180.tar.gz
mailutils-d9201c84c6b03586cebff3a1f68ad1fa550ce180.tar.bz2
Rewrite tests for interactive mail features in expect
After 4befcfd015 interpolation escapes can't be tested using autotest. Move them to DejaGNU testsuite. * mail/tests/Followup.at: Remove. * mail/tests/Reply.at: Remove. * mail/tests/followup.at: Remove. * mail/tests/reply.at: Remove. * mail/tests/Makefile.am: Remove these tests. * mail/tests/testsuite.at: Likewise. * mail/.gitignore: Fix the entry for mail. * mail/testsuite/mail/Followup.exp: New test. * mail/testsuite/mail/Reply.exp: New test. * mail/testsuite/mail/followup.exp: New test. * mail/testsuite/mail/reply.exp: New test. * mail/testsuite/mail/DISTFILES: Add these files. * mail/testsuite/lib/mail.exp (mail_version): Don't print the version number. * mail/testsuite/mail/write.exp: Preserve current working directory.
-rw-r--r--mail/.gitignore2
-rw-r--r--mail/tests/Followup.at197
-rw-r--r--mail/tests/Makefile.am4
-rw-r--r--mail/tests/Reply.at158
-rw-r--r--mail/tests/followup.at148
-rw-r--r--mail/tests/reply.at109
-rw-r--r--mail/tests/testsuite.at4
-rw-r--r--mail/testsuite/lib/mail.exp9
-rw-r--r--mail/testsuite/mail/DISTFILES4
-rw-r--r--mail/testsuite/mail/Followup.exp152
-rw-r--r--mail/testsuite/mail/Reply.exp88
-rw-r--r--mail/testsuite/mail/followup.exp124
-rw-r--r--mail/testsuite/mail/reply.exp68
-rw-r--r--mail/testsuite/mail/write.exp4
14 files changed, 440 insertions, 631 deletions
diff --git a/mail/.gitignore b/mail/.gitignore
index 01146efbc..817194492 100644
--- a/mail/.gitignore
+++ b/mail/.gitignore
@@ -2,7 +2,7 @@ Makefile.in
Makefile
.deps
.libs
-mail
+/mail
msgset.c
y.output
.gdbinit
diff --git a/mail/tests/Followup.at b/mail/tests/Followup.at
deleted file mode 100644
index b93d36800..000000000
--- a/mail/tests/Followup.at
+++ /dev/null
@@ -1,197 +0,0 @@
-# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2015-2021 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 <http://www.gnu.org/licenses/>.
-
-AT_SETUP([Followup])
-AT_KEYWORDS([reply])
-
-AT_DATA([inbox],
-[From hare@wonder.land Mon Jul 29 22:00:08 2002
-Received: (from hare@wonder.land)
- by wonder.land id 3301
- for alice@wonder.land; Mon, 29 Jul 2002 22:00:06 +0100
-Date: Mon, 29 Jul 2002 22:00:01 +0100
-From: March Hare <hare@wonder.land>
-Message-Id: <200207292200.3301@wonder.land>
-To: Alice <alice@wonder.land>
-Subject: Invitation
-
-Have some wine
-
-From alice@wonder.land Mon Jul 29 22:00:09 2002
-Received: (from alice@wonder.land)
- by wonder.land id 3302
- for hare@wonder.land; Mon, 29 Jul 2002 22:00:07 +0100
-Date: Mon, 29 Jul 2002 22:00:02 +0100
-From: Alice <alice@wonder.land>
-Message-Id: <200207292200.3302@wonder.land>
-To: March Hare <hare@wonder.land>
-Subject: Re: Invitation
-
-I don't see any wine
-
-From hatter@example.org Mon Jul 29 22:00:10 2002
-Received: (from hatter@example.org)
- by wonder.land id 3303
- for alice@wonder.land; Mon, 29 Jul 2002 22:00:08 +0100
-Date: Mon, 29 Jul 2002 22:00:03 +0100
-From: Hatter <hatter@example.org>
-Message-Id: <200207292200.3303@wonder.land>
-To: Alice <alice@wonder.land>
-Subject: Re: Invitation
-
-There isn't any
-
-From alice@wonder.land Mon Jul 29 22:00:11 2002
-Received: (from alice@wonder.land)
- by wonder.land id 3304
- for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
-Date: Mon, 29 Jul 2002 22:00:04 +0100
-From: Alice <alice@wonder.land>
-Message-Id: <200207292200.3304@wonder.land>
-To: March Hare <hare@wonder.land>
-Subject: Re: Invitation
-
-Then it wasn't very civil of you to offer it
-
-From hare@wonder.land Mon Jul 29 22:00:12 2002
-Received: (from hare@wonder.land)
- by wonder.land id 3305
- for alice@wonder.land; Mon, 29 Jul 2002 22:00:10 +0100
-Date: Mon, 29 Jul 2002 22:00:05 +0100
-From: March Hare <hare@wonder.land>
-Message-Id: <200207292200.3305@wonder.land>
-To: Alice <alice@wonder.land>
-Subject: Re: Invitation
-
-It wasn't very civil of you to sit down without being invited
-])
-
-AT_CHECK([touch record
-mkdir folder outfolder
-])
-
-AT_DATA([com],
-[set dot indentprefix=">"
-retain To
-Followup 2 1 3
-~m
-.
-x
-])
-
-AT_CHECK([
-unset MAIL_DUMP
-MUT_MAIL_CMD -f ./inbox \
- -E "set noheader" \
- -E "set sendmail=$MAILER" \
- -E "set record=$(pwd)/record" \
- -E "set folder=$(pwd)/folder" \
- -E "set outfolder" < com
-],
-[0],
-[To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>,"Hatter" <hatter@example.org>
-Subject: Re: Invitation
-
-Interpolating: 2
-(continue)
-])
-
-AT_CHECK([
-sed -e '/^SENDER:/d' \
- -e '/^Date:/d' \
- -e '/^X-Mailer:/d' \
- mail.dump],
-[0],
-[MSGID: 0001
-NRCPT: 3
-RCPT[[0]]: <alice@wonder.land>
-RCPT[[1]]: <hare@wonder.land>
-RCPT[[2]]: <hatter@example.org>
-LENGTH: 396
-To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>,"Hatter" <hatter@example.org>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100
- <200207292200.3302@wonder.land>
-References: <200207292200.3302@wonder.land>
-
->To: March Hare <hare@wonder.land>
->
->I don't see any wine
->
-
-])
-
-AT_CHECK([sed -e '1s/^From .*/Envelope/' \
- -e '/^X-[[a-zA-Z]]*:/d' \
- -e '/^Date:/d' folder/alice
-],
-[0],
-[Envelope
-To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>,"Hatter" <hatter@example.org>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100
- <200207292200.3302@wonder.land>
-References: <200207292200.3302@wonder.land>
-
->To: March Hare <hare@wonder.land>
->
->I don't see any wine
->
-
-])
-
-#
-#
-#
-AT_CHECK([
-unset MAIL_DUMP
-MUT_MAIL_CMD -f ./inbox \
- -E "set noheader" \
- -E "set sendmail=$MAILER" \
- -E "set record=$(pwd)/record" \
- -E "set folder=$(pwd)/folder" \
- -E "set outfolder=$(pwd)/outfolder" < com
-],
-[0],
-[To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>,"Hatter" <hatter@example.org>
-Subject: Re: Invitation
-
-Interpolating: 2
-(continue)
-])
-
-AT_CHECK([sed -e '1s/^From .*/Envelope/' \
- -e '/^X-[[a-zA-Z]]*:/d' \
- -e '/^Date:/d' outfolder/alice
-],
-[0],
-[Envelope
-To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>,"Hatter" <hatter@example.org>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100
- <200207292200.3302@wonder.land>
-References: <200207292200.3302@wonder.land>
-
->To: March Hare <hare@wonder.land>
->
->I don't see any wine
->
-
-])
-
-
-AT_CLEANUP
-
diff --git a/mail/tests/Makefile.am b/mail/tests/Makefile.am
index dafbef646..7e343375a 100644
--- a/mail/tests/Makefile.am
+++ b/mail/tests/Makefile.am
@@ -26,12 +26,8 @@ TESTSUITE_AT +=\
copy02.at\
copy03.at\
copy04.at\
- followup.at\
- Followup.at\
hold.at\
nohome.at\
- reply.at\
- Reply.at\
send.at\
sendrec.at\
sendbyname.at\
diff --git a/mail/tests/Reply.at b/mail/tests/Reply.at
deleted file mode 100644
index 08639c1bc..000000000
--- a/mail/tests/Reply.at
+++ /dev/null
@@ -1,158 +0,0 @@
-# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2015-2021 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 <http://www.gnu.org/licenses/>.
-
-AT_SETUP([Reply])
-AT_KEYWORDS([reply])
-
-AT_DATA([inbox],
-[From hare@wonder.land Mon Jul 29 22:00:08 2002
-Received: (from hare@wonder.land)
- by wonder.land id 3301
- for alice@wonder.land; Mon, 29 Jul 2002 22:00:06 +0100
-Date: Mon, 29 Jul 2002 22:00:01 +0100
-From: March Hare <hare@wonder.land>
-Message-Id: <200207292200.3301@wonder.land>
-To: Alice <alice@wonder.land>
-Subject: Invitation
-
-Have some wine
-
-From alice@wonder.land Mon Jul 29 22:00:09 2002
-Received: (from alice@wonder.land)
- by wonder.land id 3302
- for hare@wonder.land; Mon, 29 Jul 2002 22:00:07 +0100
-Date: Mon, 29 Jul 2002 22:00:02 +0100
-From: Alice <alice@wonder.land>
-Message-Id: <200207292200.3302@wonder.land>
-To: March Hare <hare@wonder.land>
-Subject: Re: Invitation
-
-I don't see any wine
-
-From hatter@example.org Mon Jul 29 22:00:10 2002
-Received: (from hatter@example.org)
- by wonder.land id 3303
- for alice@wonder.land; Mon, 29 Jul 2002 22:00:08 +0100
-Date: Mon, 29 Jul 2002 22:00:03 +0100
-From: Hatter <hatter@example.org>
-Message-Id: <200207292200.3303@wonder.land>
-To: Alice <alice@wonder.land>
-Subject: Re: Invitation
-
-There isn't any
-
-From alice@wonder.land Mon Jul 29 22:00:11 2002
-Received: (from alice@wonder.land)
- by wonder.land id 3304
- for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
-Date: Mon, 29 Jul 2002 22:00:04 +0100
-From: Alice <alice@wonder.land>
-Message-Id: <200207292200.3304@wonder.land>
-To: March Hare <hare@wonder.land>
-Subject: Re: Invitation
-
-Then it wasn't very civil of you to offer it
-
-From hare@wonder.land Mon Jul 29 22:00:12 2002
-Received: (from hare@wonder.land)
- by wonder.land id 3305
- for alice@wonder.land; Mon, 29 Jul 2002 22:00:10 +0100
-Date: Mon, 29 Jul 2002 22:00:05 +0100
-From: March Hare <hare@wonder.land>
-Message-Id: <200207292200.3305@wonder.land>
-To: Alice <alice@wonder.land>
-Subject: Re: Invitation
-
-It wasn't very civil of you to sit down without being invited
-])
-
-AT_CHECK([touch record
-mkdir folder outfolder
-])
-
-AT_CHECK([
-AT_DATA([com],
-[set dot indentprefix=">"
-retain To
-Reply 2 1 3
-~m
-.
-x
-])
-
-unset MAIL_DUMP
-MUT_MAIL_CMD -f ./inbox \
- -E "set noheader" \
- -E "set sendmail=$MAILER" \
- -E "set record=$(pwd)/record" \
- -E "set folder=$(pwd)/folder" \
- -E "set outfolder" < com
-],
-[0],
-[To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>,"Hatter" <hatter@example.org>
-Subject: Re: Invitation
-
-Interpolating: 2
-(continue)
-])
-
-AT_CHECK([
-sed -e '/^SENDER:/d' \
- -e '/^Date:/d' \
- -e '/^X-Mailer:/d' \
- mail.dump],
-[0],
-[MSGID: 0001
-NRCPT: 3
-RCPT[[0]]: <alice@wonder.land>
-RCPT[[1]]: <hare@wonder.land>
-RCPT[[2]]: <hatter@example.org>
-LENGTH: 396
-To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>,"Hatter" <hatter@example.org>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100
- <200207292200.3302@wonder.land>
-References: <200207292200.3302@wonder.land>
-
->To: March Hare <hare@wonder.land>
->
->I don't see any wine
->
-
-])
-
-AT_CHECK([sed -e '1s/^From .*/Envelope/' \
- -e '/^X-[[a-zA-Z]]*:/d' \
- -e '/^Date:/d' record
-],
-[0],
-[Envelope
-To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>,"Hatter" <hatter@example.org>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100
- <200207292200.3302@wonder.land>
-References: <200207292200.3302@wonder.land>
-
->To: March Hare <hare@wonder.land>
->
->I don't see any wine
->
-
-])
-
-
-AT_CLEANUP
-
diff --git a/mail/tests/followup.at b/mail/tests/followup.at
deleted file mode 100644
index cf55233cf..000000000
--- a/mail/tests/followup.at
+++ /dev/null
@@ -1,148 +0,0 @@
-# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2015-2021 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 <http://www.gnu.org/licenses/>.
-
-AT_SETUP([followup])
-AT_KEYWORDS([followup])
-
-AT_DATA([inbox],
-[From hare@wonder.land Mon Jul 29 22:00:08 2002
-Received: (from hare@wonder.land)
- by wonder.land id 3301
- for alice@wonder.land; Mon, 29 Jul 2002 22:00:06 +0100
-Date: Mon, 29 Jul 2002 22:00:01 +0100
-From: March Hare <hare@wonder.land>
-Message-Id: <200207292200.3301@wonder.land>
-To: Alice <alice@wonder.land>
-Subject: Invitation
-
-Have some wine
-
-])
-
-AT_CHECK([touch record
-mkdir folder outfolder
-])
-
-AT_DATA([com],
-[set dot indentprefix=">"
-retain To
-followup 1
-~m
-.
-x
-])
-
-AT_CHECK([
-unset MAIL_DUMP
-MUT_MAIL_CMD -f ./inbox \
- -E "set noheader" \
- -E "set sendmail=$MAILER" \
- -E "set record=$(pwd)/record" \
- -E "set folder=$(pwd)/folder" \
- -E "set outfolder" < com
-],
-[0],
-[To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>
-Subject: Re: Invitation
-
-Interpolating: 1
-(continue)
-])
-
-AT_CHECK([
-sed -e '/^SENDER:/d' \
- -e '/^Date:/d' \
- -e '/^X-Mailer:/d' \
- mail.dump],
-[0],
-[MSGID: 0001
-NRCPT: 2
-RCPT[[0]]: <hare@wonder.land>
-RCPT[[1]]: <alice@wonder.land>
-LENGTH: 356
-To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100
- <200207292200.3301@wonder.land>
-References: <200207292200.3301@wonder.land>
-
->To: Alice <alice@wonder.land>
->
->Have some wine
->
-
-])
-
-AT_CHECK([
-sed -e '1s/^From .*/Envelope/' \
- -e '/^X-[[a-zA-Z]]*:/d' \
- -e '/^Date:/d' folder/hare],
-[0],
-[Envelope
-To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100
- <200207292200.3301@wonder.land>
-References: <200207292200.3301@wonder.land>
-
->To: Alice <alice@wonder.land>
->
->Have some wine
->
-
-])
-
-#
-#
-#
-AT_CHECK([
-unset MAIL_DUMP
-MUT_MAIL_CMD -f ./inbox \
- -E "set noheader" \
- -E "set sendmail=$MAILER" \
- -E "set record=$(pwd)/record" \
- -E "set folder=$(pwd)/folder" \
- -E "set outfolder=$(pwd)/outfolder" < com
-],
-[0],
-[To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>
-Subject: Re: Invitation
-
-Interpolating: 1
-(continue)
-])
-
-AT_CHECK([
-sed -e '1s/^From .*/Envelope/' \
- -e '/^X-[[a-zA-Z]]*:/d' \
- -e '/^Date:/d' outfolder/hare],
-[0],
-[Envelope
-To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100
- <200207292200.3301@wonder.land>
-References: <200207292200.3301@wonder.land>
-
->To: Alice <alice@wonder.land>
->
->Have some wine
->
-
-])
-
-AT_CLEANUP
-
diff --git a/mail/tests/reply.at b/mail/tests/reply.at
deleted file mode 100644
index 45542c9d6..000000000
--- a/mail/tests/reply.at
+++ /dev/null
@@ -1,109 +0,0 @@
-# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2015-2021 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 <http://www.gnu.org/licenses/>.
-
-AT_SETUP([reply])
-AT_KEYWORDS([reply])
-
-AT_DATA([inbox],
-[From hare@wonder.land Mon Jul 29 22:00:08 2002
-Received: (from hare@wonder.land)
- by wonder.land id 3301
- for alice@wonder.land; Mon, 29 Jul 2002 22:00:06 +0100
-Date: Mon, 29 Jul 2002 22:00:01 +0100
-From: March Hare <hare@wonder.land>
-Message-Id: <200207292200.3301@wonder.land>
-To: Alice <alice@wonder.land>
-Subject: Invitation
-
-Have some wine
-
-])
-
-AT_CHECK([touch record
-mkdir folder outfolder
-])
-
-AT_CHECK([
-AT_DATA([com],
-[set dot indentprefix=">"
-retain To
-reply 1
-~m
-.
-x
-])
-
-unset MAIL_DUMP
-MUT_MAIL_CMD -f ./inbox \
- -E "set noheader" \
- -E "set sendmail=$MAILER" \
- -E "set record=$(pwd)/record" \
- -E "set folder=$(pwd)/folder" \
- -E "set outfolder" < com
-],
-[0],
-[To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>
-Subject: Re: Invitation
-
-Interpolating: 1
-(continue)
-])
-
-AT_CHECK([
-sed -e '/^SENDER:/d' \
- -e '/^Date:/d' \
- -e '/^X-Mailer:/d' \
- mail.dump],
-[0],
-[MSGID: 0001
-NRCPT: 2
-RCPT[[0]]: <hare@wonder.land>
-RCPT[[1]]: <alice@wonder.land>
-LENGTH: 356
-To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100
- <200207292200.3301@wonder.land>
-References: <200207292200.3301@wonder.land>
-
->To: Alice <alice@wonder.land>
->
->Have some wine
->
-
-])
-
-AT_CHECK([
-sed -e '1s/^From .*/Envelope/' \
- -e '/^X-[[a-zA-Z]]*:/d' \
- -e '/^Date:/d' record],
-[0],
-[Envelope
-To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>
-Subject: Re: Invitation
-In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100
- <200207292200.3301@wonder.land>
-References: <200207292200.3301@wonder.land>
-
->To: Alice <alice@wonder.land>
->
->Have some wine
->
-
-])
-
-AT_CLEANUP
-
diff --git a/mail/tests/testsuite.at b/mail/tests/testsuite.at
index 972d19e75..5c9c15091 100644
--- a/mail/tests/testsuite.at
+++ b/mail/tests/testsuite.at
@@ -39,7 +39,3 @@ m4_include([send.at])
m4_include([sendrec.at])
m4_include([sendbyname.at])
-m4_include([reply.at])
-m4_include([Reply.at])
-m4_include([followup.at])
-m4_include([Followup.at])
diff --git a/mail/testsuite/lib/mail.exp b/mail/testsuite/lib/mail.exp
index b705f2773..ad942f51b 100644
--- a/mail/testsuite/lib/mail.exp
+++ b/mail/testsuite/lib/mail.exp
@@ -32,16 +32,7 @@ if ![info exists mail_prompt] then {
### Only procedures should come after this point.
proc mail_version {} {
- global MU_TOOL
- global MU_TOOL_FLAGS
- global MU_TOOL_VERSION
-
mu_version
- if ![is_remote host] {
- clone_output "[which $MU_TOOL] version $MU_TOOL_VERSION"
- } else {
- clone_output "$MU_TOOL on remote host version $MU_TOOL_VERSION"
- }
}
proc default_mail_start {args} {
diff --git a/mail/testsuite/mail/DISTFILES b/mail/testsuite/mail/DISTFILES
index 678c494e9..736f3b237 100644
--- a/mail/testsuite/mail/DISTFILES
+++ b/mail/testsuite/mail/DISTFILES
@@ -6,3 +6,7 @@ send.exp
tag.exp
write.exp
z.exp
+reply.exp
+Reply.exp
+followup.exp
+Followup.exp
diff --git a/mail/testsuite/mail/Followup.exp b/mail/testsuite/mail/Followup.exp
new file mode 100644
index 000000000..d41ea2ccd
--- /dev/null
+++ b/mail/testsuite/mail/Followup.exp
@@ -0,0 +1,152 @@
+# -*- tcl -*-
+# This file is part of Mailutils testsuite.
+# Copyright (C) 2021 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 of the License, 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 <http://www.gnu.org/licenses/>.
+
+mail_version
+
+if ![mu_check_capability ENABLE_SENDMAIL] {
+ unsupported "Support for sendmail not compiled in"
+} else {
+ mail_start "--file=%teaparty.mbox" \
+ "-E" "set noheader" \
+ "-E" "set sendmail=sendmail://$top_builddir/testsuite/mockmail" \
+ "-E" "set record=$MU_SPOOL_DIR/record" \
+ "-E" "set folder=$MU_SPOOL_DIR/folder" \
+ "-E" "set dot" \
+ "-E" "set indentprefix=>"
+
+ file mkdir $MU_SPOOL_DIR/folder
+
+ mail_test "setenv MAIL_DUMP=\"$MU_SPOOL_DIR/mail.dump\""
+ mail_test "retain To"
+ mail_test "set outfolder"
+
+ mail_test -noprompt "Followup 2 1 3" \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>}\
+ {Subject: Re: Invitation}\
+ {}
+
+ mail_test -noprompt "~m" \
+ {Interpolating: 2} \
+ {(continue)}
+
+ mail_test "."
+ mail_stop
+
+ mu_test_file "$MU_SPOOL_DIR/mail.dump" \
+ {MSGID: 0001} \
+ -re {^SENDER: [^ \r\n]*} \
+ {NRCPT: 2} \
+ {RCPT[0]: <alice@wonder.land>} \
+ {RCPT[1]: <hare@wonder.land>} \
+ -re {^LENGTH: [0-9]+} \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100} \
+ { <200207292200.3302@wonder.land>} \
+ {References: <200207292200.3302@wonder.land>} \
+ "X-Mailer: mail (GNU Mailutils $MU_TOOL_VERSION)" \
+ -re {^Date:[^\r\n]*} \
+ {}\
+ {To: March Hare <hare@wonder.land>} \
+ {>} \
+ {>I don't see any wine} \
+ {>}
+
+ mu_test_file "$MU_SPOOL_DIR/folder/alice" \
+ -re {^From[^\r\n]*} \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100} \
+ { <200207292200.3302@wonder.land>} \
+ {References: <200207292200.3302@wonder.land>} \
+ "X-Mailer: mail (GNU Mailutils $MU_TOOL_VERSION)" \
+ -re {^Date:[^\r\n]*}\
+ -re {^X-IMAPbase:[^\r\n]*}\
+ -re {^X-UID:[^\r\n]*}\
+ ""\
+ {>To: March Hare <hare@wonder.land>} \
+ {>} \
+ {>I don't see any wine} \
+ {>}
+
+ #
+ #
+ #
+ mail_start "--file=%teaparty.mbox" \
+ "-E" "set noheader" \
+ "-E" "set sendmail=sendmail://$top_builddir/testsuite/mockmail" \
+ "-E" "set record=$MU_SPOOL_DIR/record" \
+ "-E" "set folder=$MU_SPOOL_DIR/folder" \
+ "-E" "set dot" \
+ "-E" "set indentprefix=>"
+
+ file mkdir $MU_SPOOL_DIR/outfolder
+
+ mail_test "setenv MAIL_DUMP=\"$MU_SPOOL_DIR/mail.dump\""
+ mail_test "retain To"
+ mail_test "set outfolder=\"$MU_SPOOL_DIR/outfolder\""
+
+ mail_test -noprompt "Followup 2 1 3" \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>}\
+ {Subject: Re: Invitation}\
+ {}
+
+ mail_test -noprompt "~m" \
+ {Interpolating: 2} \
+ {(continue)}
+
+ mail_test "."
+ mail_stop
+
+ mu_test_file "$MU_SPOOL_DIR/mail.dump" \
+ {MSGID: 0001} \
+ -re {^SENDER: [^ \r\n]*} \
+ {NRCPT: 2} \
+ {RCPT[0]: <alice@wonder.land>} \
+ {RCPT[1]: <hare@wonder.land>} \
+ -re {^LENGTH: [0-9]+} \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100} \
+ { <200207292200.3302@wonder.land>} \
+ {References: <200207292200.3302@wonder.land>} \
+ "X-Mailer: mail (GNU Mailutils $MU_TOOL_VERSION)" \
+ -re {^Date:[^\r\n]*} \
+ {}\
+ {To: March Hare <hare@wonder.land>} \
+ {>} \
+ {>I don't see any wine} \
+ {>}
+
+ mu_test_file "$MU_SPOOL_DIR/outfolder/alice" \
+ -re {^From[^\r\n]*} \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100} \
+ { <200207292200.3302@wonder.land>} \
+ {References: <200207292200.3302@wonder.land>} \
+ "X-Mailer: mail (GNU Mailutils $MU_TOOL_VERSION)" \
+ -re {^Date:[^\r\n]*}\
+ -re {^X-IMAPbase:[^\r\n]*}\
+ -re {^X-UID:[^\r\n]*}\
+ ""\
+ {>To: March Hare <hare@wonder.land>} \
+ {>} \
+ {>I don't see any wine} \
+ {>}
+
+}
diff --git a/mail/testsuite/mail/Reply.exp b/mail/testsuite/mail/Reply.exp
new file mode 100644
index 000000000..8f0687401
--- /dev/null
+++ b/mail/testsuite/mail/Reply.exp
@@ -0,0 +1,88 @@
+# -*- tcl -*-
+# This file is part of Mailutils testsuite.
+# Copyright (C) 2021 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 of the License, 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 <http://www.gnu.org/licenses/>.
+
+mail_version
+
+if ![mu_check_capability ENABLE_SENDMAIL] {
+ unsupported "Support for sendmail not compiled in"
+} else {
+ mail_start "--file=%teaparty.mbox" \
+ "-E" "set noheader" \
+ "-E" "set sendmail=sendmail://$top_builddir/testsuite/mockmail" \
+ "-E" "set record=$MU_SPOOL_DIR/record" \
+ "-E" "set folder=$MU_SPOOL_DIR/folder" \
+ "-E" "set outfolder" \
+ "-E" "set dot" \
+ "-E" "set indentprefix=>"
+
+ file mkdir $MU_SPOOL_DIR/folder
+ file mkdir $MU_SPOOL_DIR/outfolder
+
+ mail_test "setenv MAIL_DUMP=\"$MU_SPOOL_DIR/mail.dump\""
+
+ mail_test "retain To"
+ mail_test -noprompt "Reply 2 1 3" \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>}\
+ {Subject: Re: Invitation}\
+ {}
+
+ mail_test -noprompt "~m" \
+ {Interpolating: 2} \
+ {(continue)}
+
+ mail_test "."
+
+ mu_test_file "$MU_SPOOL_DIR/mail.dump" \
+ {MSGID: 0001} \
+ -re {^SENDER: [^ \r\n]*} \
+ {NRCPT: 2} \
+ {RCPT[0]: <alice@wonder.land>} \
+ {RCPT[1]: <hare@wonder.land>} \
+ -re {^LENGTH: [0-9]+} \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100} \
+ { <200207292200.3302@wonder.land>} \
+ {References: <200207292200.3302@wonder.land>} \
+ "X-Mailer: mail (GNU Mailutils $MU_TOOL_VERSION)" \
+ -re {^Date:[^\r\n]*} \
+ {}\
+ {To: March Hare <hare@wonder.land>} \
+ {>} \
+ {>I don't see any wine} \
+ {>}
+
+ mu_test_file "$MU_SPOOL_DIR/record" \
+ -re {^From[^\r\n]*} \
+ {To: "Alice" <alice@wonder.land>,"March Hare" <hare@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:02 +0100} \
+ { <200207292200.3302@wonder.land>} \
+ {References: <200207292200.3302@wonder.land>} \
+ "X-Mailer: mail (GNU Mailutils $MU_TOOL_VERSION)" \
+ -re {^Date:[^\r\n]*}\
+ -re {^X-IMAPbase:[^\r\n]*}\
+ -re {^X-UID:[^\r\n]*}\
+ ""\
+ {>To: March Hare <hare@wonder.land>} \
+ {>} \
+ {>I don't see any wine} \
+ {>}
+
+ mail_stop
+}
+
diff --git a/mail/testsuite/mail/followup.exp b/mail/testsuite/mail/followup.exp
new file mode 100644
index 000000000..af2a31f3b
--- /dev/null
+++ b/mail/testsuite/mail/followup.exp
@@ -0,0 +1,124 @@
+# -*- tcl -*-
+# This file is part of Mailutils testsuite.
+# Copyright (C) 2021 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 of the License, 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 <http://www.gnu.org/licenses/>.
+
+mail_version
+
+if ![mu_check_capability ENABLE_SENDMAIL] {
+ unsupported "Support for sendmail not compiled in"
+} else {
+ mail_start "--file=%teaparty.mbox" \
+ "-E" "set noheader" \
+ "-E" "set sendmail=sendmail://$top_builddir/testsuite/mockmail" \
+ "-E" "set record=$MU_SPOOL_DIR/record" \
+ "-E" "set folder=$MU_SPOOL_DIR/folder" \
+ "-E" "set dot" \
+ "-E" "set indentprefix=>"
+
+ file mkdir $MU_SPOOL_DIR/folder
+
+ mail_test "setenv MAIL_DUMP=\"$MU_SPOOL_DIR/mail.dump\""
+ mail_test "retain To"
+ mail_test "set outfolder"
+
+ mail_test -noprompt "followup 1" \
+ {To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {}
+
+ mail_test -noprompt "~m" \
+ {Interpolating: 1} \
+ {(continue)}
+
+ mail_test "."
+
+ mail_stop
+
+ mu_test_file "$MU_SPOOL_DIR/mail.dump" \
+ {MSGID: 0001} \
+ {NRCPT: 2} \
+ {RCPT[0]: <hare@wonder.land>} \
+ {RCPT[1]: <alice@wonder.land>} \
+ -re {^LENGTH: [0-9]+} \
+ {To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100} \
+ { <200207292200.3301@wonder.land>} \
+ {References: <200207292200.3301@wonder.land>} \
+ "" \
+ {>To: Alice <alice@wonder.land>} \
+ {>} \
+ {>Have some wine} \
+ {>}
+
+ mu_test_file "$MU_SPOOL_DIR/folder/hare" \
+ -re {^From[^\r\n]*} \
+ {To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100} \
+ { <200207292200.3301@wonder.land>} \
+ {References: <200207292200.3301@wonder.land>} \
+ {} \
+ {>To: Alice <alice@wonder.land>} \
+ {>} \
+ {>Have some wine} \
+ {>}
+
+ #
+ #
+ #
+ mail_start "--file=%teaparty.mbox" \
+ "-E" "set noheader" \
+ "-E" "set sendmail=sendmail://$top_builddir/testsuite/mockmail" \
+ "-E" "set record=$MU_SPOOL_DIR/record" \
+ "-E" "set folder=$MU_SPOOL_DIR/folder" \
+ "-E" "set dot" \
+ "-E" "set indentprefix=>"
+ file mkdir $MU_SPOOL_DIR/outfolder
+ mail_test "set outfolder=\"$MU_SPOOL_DIR/outfolder\""
+
+ mail_test -noprompt "followup 1" \
+ {To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {}
+
+ mail_test -noprompt "~m" \
+ {Interpolating: 1} \
+ {(continue)}
+
+ mail_test "."
+
+ mail_stop
+
+ mu_test_file "$MU_SPOOL_DIR/outfolder/hare" \
+ -re {^From[^\r\n]*} \
+ {To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>} \
+ {Subject: Re: Invitation} \
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100} \
+ { <200207292200.3301@wonder.land>} \
+ {References: <200207292200.3301@wonder.land>} \
+ {} \
+ {>To: Alice <alice@wonder.land>} \
+ {>} \
+ {>Have some wine} \
+ {>}
+
+}
+
+
+
+
+
diff --git a/mail/testsuite/mail/reply.exp b/mail/testsuite/mail/reply.exp
new file mode 100644
index 000000000..1cfcc3e87
--- /dev/null
+++ b/mail/testsuite/mail/reply.exp
@@ -0,0 +1,68 @@
+# -*- tcl -*-
+# This file is part of Mailutils testsuite.
+# Copyright (C) 2021 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 of the License, 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 <http://www.gnu.org/licenses/>.
+
+mail_version
+
+if ![mu_check_capability ENABLE_SENDMAIL] {
+ unsupported "Support for sendmail not compiled in"
+} else {
+ mail_start "--file=%teaparty.mbox" \
+ "-E" "set noheader" \
+ "-E" "set sendmail=sendmail://$top_builddir/testsuite/mockmail" \
+ "-E" "set record=$MU_SPOOL_DIR/record" \
+ "-E" "set folder=$MU_SPOOL_DIR/folder" \
+ "-E" "set outfolder" \
+ "-E" "set dot" \
+ "-E" "set indentprefix=>"
+
+ file mkdir $MU_SPOOL_DIR/folder
+ file mkdir $MU_SPOOL_DIR/outfolder
+ unset -nocomplain env(MAIL_DUMP)
+ mail_test "retain To"
+ mail_test -noprompt "reply 1" \
+ {To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>}\
+ {Subject: Re: Invitation}\
+ {}
+
+ mail_test -noprompt "~m" \
+ {Interpolating: 1} \
+ {(continue)}
+
+ mail_test "."
+
+ mu_test_file "$MU_SPOOL_DIR/record" \
+ -re {^From[^\r\n]*}\
+ {To: "March Hare" <hare@wonder.land>,"Alice" <alice@wonder.land>}\
+ {Subject: Re: Invitation}\
+ {In-Reply-To: Your message of Mon, 29 Jul 2002 22:00:01 +0100}\
+ -re {[[:space:]]+<200207292200.3301@wonder.land>}\
+ {References: <200207292200.3301@wonder.land>}\
+ "X-Mailer: mail (GNU Mailutils $MU_TOOL_VERSION)"\
+ -re {^Date:[^\r\n]*}\
+ -re {^X-IMAPbase:[^\r\n]*}\
+ -re {^X-UID:[^\r\n]*}\
+ ""\
+ {>To: Alice <alice@wonder.land>}\
+ {>}\
+ {>Have some wine}\
+ {>}
+
+ mail_stop
+}
+
+
+
diff --git a/mail/testsuite/mail/write.exp b/mail/testsuite/mail/write.exp
index c54b00d12..3afdefaf8 100644
--- a/mail/testsuite/mail/write.exp
+++ b/mail/testsuite/mail/write.exp
@@ -93,6 +93,7 @@ mail_test "headers" \
mail_exit
# Test write
+set dir [pwd]
cd "$MU_FOLDER_DIR"
mail_start -reuse-spool "--file=%teaparty.mbox"
mail_test "write" \
@@ -115,7 +116,8 @@ mu_test_file "hare" \
"Have some wine" \
"I don't see any wine" \
"There isn't any"
-
+cd $dir
mail_stop
+
# End of write.exp

Return to:

Send suggestions and report system problems to the System administrator.