summaryrefslogtreecommitdiff
path: root/mail/testsuite/mail/send.exp
blob: a12d958c46b85713513185f1e40b62506765c0e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2002-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=%mbox1"

    mail_command "set sendmail=\"sendmail:$top_builddir/testsuite/mockmail\""
    mail_command "set inplacealiases"
    mail_command "setenv MAIL_DUMP=\"$MU_FOLDER_DIR/mta.diag\""

    mail_test -noprompt "reply 1" \
	"To: \"Foo Bar\" <foobar@nonexistent.net>,\"Bar\" <bar@dontmailme.org>"\
	"Subject: Re: Jabberwocky"\
	""

    mail_test -noprompt "~m"\
	"Interpolating: 1"\
	"(continue)"
    
    mail_test "." 

    mail_stop

    mu_test_file "$MU_FOLDER_DIR/mta.diag" \
	"MSGID: 0001"\
	-re {^SENDER: [^ \r\n]*}\
        "NRCPT: 2"\
        "RCPT\[0\]: <foobar@nonexistent.net>"\
	"RCPT\[1\]: <bar@dontmailme.org>"\
	-re {^LENGTH: [0-9]+}\
	"To: \"Foo Bar\" <foobar@nonexistent.net>,\"Bar\" <bar@dontmailme.org>"\
	"Subject: Re: Jabberwocky"\
	"In-Reply-To: Your message of Fri, 28 Dec 2001 22:18:08 +0200"\
	"\t<200112282018.fBSKI8N04906@nonexistent.net>"\
	"References: <200112282018.fBSKI8N04906@nonexistent.net>"\
	"User-Agent: mail (GNU Mailutils $MU_TOOL_VERSION)"\
	-re {^Date:[^\r\n]*}\
	""\
	"> Received: (from foobar@nonexistent.net)"\
	"> 	by nonexistent.net id fBSKI8N04906"\
	"> 	for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200"\
	"> Date: Fri, 28 Dec 2001 22:18:08 +0200"\
	"> From: Foo Bar <foobar@nonexistent.net>"\
	"> Message-Id: <200112282018.fBSKI8N04906@nonexistent.net>"\
	"> To: Bar <bar@dontmailme.org>"\
	"> Subject: Jabberwocky"\
	">"\
	"> `Twas brillig, and the slithy toves"\
	"> Did gyre and gimble in the wabe;"\
	"> All mimsy were the borogoves,"\
	"> And the mome raths outgrabe."\
	"> "\
	"> `Beware the Jabberwock, my son!"\
	"> The jaws that bite, the claws that catch!"\
	"> Beware the Jujub bird, and shun"\
	"> The frumious Bandersnatch!'"\
	"> "\
	"> He took his vorpal sword in hand:"\
	"> Long time the manxome foe he sought --"\
	"> So rested he by the Tumtum gree,"\
	"> And stood awhile in thought."\
	"> "\
	"> And as in uffish thought he stood,"\
	"> The Jabberwock, with eyes of flame,"\
	"> Came whiffling through the tulgey wook,"\
	"> And burbled as it came!"\
	"> "\
	"> One, two!  One, two!  And through and through"\
	"> The vorpal blade went snicker-snack!"\
	"> He left it dead, and with its head"\
	"> He went galumphing back."\
	"> "\
	"> `And has thou slain the Jabberwock?"\
	"> Come to my arms, my beamish boy!"\
	"> O frabjous day!  Calloh!  Callay!"\
	"> He chortled in his joy."\
	"> "\
	"> `Twas brillig, and the slithy toves"\
	"> Did gyre and gimble in the wabe;"\
	"> All mimsy were the borogoves,"\
	"> And the mome raths outgrabe."\
	"> "\
	""
}

# End of send.exp

Return to:

Send suggestions and report system problems to the System administrator.