Debian Codegraph @

test/post/test-post-group

raw
1 #!/bin/sh
2 #
3 # Test the behavior of post when using group addresses
4 #
5
6 set -e
7
8 if test -z "${MH_OBJ_DIR}"; then
9 srcdir=`dirname "$0"`/../..
10 MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
11 fi
12
13 . "${srcdir}/test/post/test-post-common.sh"
14
15 #
16 # Group test
17 #
18 cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
19 From: Mr Nobody <[email protected]>
20 To: our-group: Somebody One <[email protected]>
21 Somebody Two <[email protected]>;
22 Subject: Group test
23
24 This is test of group recipients.
25 EOF
26
27 cat > "${testname}.expected" <<EOF
28 EHLO nosuchhost.example.com
29 MAIL FROM:<[email protected]>
30 RCPT TO:<[email protected]>
31 RCPT TO:<[email protected]>
32 DATA
33 From: Mr Nobody <[email protected]>
34 To: our-group: ;
35 Subject: Group test
36 MIME-Version: 1.0
37 Content-Type: text/plain; charset="us-ascii"
38 Date:
39
40 This is test of group recipients.
41 .
42 QUIT
43 EOF
44
45 test_post "${testname}.actual" "${testname}.expected"
46
47 exit ${failed:-0}