diff options
Diffstat (limited to 'mda/tests/lmtpd.at')
-rw-r--r-- | mda/tests/lmtpd.at | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/mda/tests/lmtpd.at b/mda/tests/lmtpd.at new file mode 100644 index 000000000..ab892a18a --- /dev/null +++ b/mda/tests/lmtpd.at @@ -0,0 +1,58 @@ +# This file is part of GNU Mailutils. -*- Autotest -*- +# Copyright (C) 2010-2019 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([lmtpd]) +AT_KEYWORDS([lmtpd]) + +m4_pushdef([tocrlf],[dnl +$abs_top_builddir/libmailutils/tests/fltst crlf encode read]) + +AT_CHECK([ +AT_DATA([session_start],[LHLO localhost +MAIL FROM:<gulliver@example.net> +RCPT TO:<root@localhost> +DATA +]) +AT_DATA([session_end],[. +QUIT +]) + +echo ENVELOPE > expout +cat $INPUT_MSG >> expout +echo "" >> expout + +cat session_start $INPUT_MSG session_end | tocrlf > session || exit $? + +mkdir spool +lmtpd MDA_OPTIONS --stderr --set 'group=()' < session > transcript || exit $? + +sed '1s/From gulliver@example.net.*/ENVELOPE/' spool/root +cat transcript | tr -d '\r' | sed '/...-/d;s/ .*//' >&2 +], +[0], +[expout], +[220 +250 +250 +250 +354 +250 +221 +]) + +AT_CLEANUP + +m4_popdef([tocrlf]) |