Fix typo in alternate mts.conf location support.
[mmh] / test / mhshow / test-cte-binary
1 #!/bin/sh
2 ######################################################
3 #
4 # Test Content-Transfer-Encoding: binary (Debian #136976).
5 #
6 ######################################################
7
8 if [ -z "${MH_TEST_COMMON}" ]; then
9     echo "MH_TEST_COMMON not set; try running via 'make check'"
10 fi
11
12 . ${MH_TEST_COMMON}
13
14 setup_test
15 expected=$MH_TEST_DIR/$$.expected
16 actual=$MH_TEST_DIR/$$.actual
17
18 # Write message with Content-Transfer-Encoding: binary text.
19 msgfile=$(mhpath new)
20 msgnum=$(basename $msgfile)
21 cat > $msgfile <<EOF
22 Content-Transfer-Encoding: binary
23 To: bar@example.edu
24 Content-Type: text/plain
25 Subject: test
26 From: foo@example.edu
27 MIME-Version: 1.0
28 Content-Disposition: inline
29 Message-Id: <20698507875204@example.com>
30 Date: Tue, 05 Mar 2002 18:20:35 +0000
31
32 This is a test; this is the body.
33 EOF
34
35 # check it
36 cat > $expected <<EOF
37 Date:    Tue, 05 Mar 2002 18:20:35 +0000
38 To:      bar@example.edu
39 From:    foo@example.edu
40 Subject: test
41
42 MIME-Version: 1.0
43 Content-Disposition: inline
44
45 part       text/plain                  34
46 This is a test; this is the body.
47 EOF
48 mhshow -nopause $msgnum > $actual 2>&1
49 diff -u $expected $actual