Replaced mkinstalldirs with `mkdir -p'.
[mmh] / test / tests / mhshow / test-cte-binary
1 #!/bin/sh
2 ######################################################
3 #
4 # Test Content-Transfer-Encoding: binary (Debian #136976).
5 #
6 ######################################################
7
8 expected=$MH_TEST_DIR/$$.expected
9 actual=$MH_TEST_DIR/$$.actual
10
11 # Write message with Content-Transfer-Encoding: binary text.
12 msgfile=$(mhpath new)
13 msgnum=$(basename $msgfile)
14 cat > $msgfile <<EOF
15 Content-Transfer-Encoding: binary
16 To: bar@example.edu
17 Content-Type: text/plain
18 Subject: test
19 From: foo@example.edu
20 MIME-Version: 1.0
21 Content-Disposition: inline
22 Message-Id: <20698507875204@example.com>
23 Date: Tue, 05 Mar 2002 18:20:35 +0000
24
25 This is a test; this is the body.
26 EOF
27
28 # check it
29 cat > $expected <<EOF
30 Date:    Tue, 05 Mar 2002 18:20:35 GMT
31 To:      bar@example.edu
32 From:    foo@example.edu
33 Subject: test
34
35 MIME-Version: 1.0
36 Content-Disposition: inline
37
38 part       text/plain                  34
39 This is a test; this is the body.
40 EOF
41 mhshow $msgnum > $actual 2>&1
42 diff -u $expected $actual