]> diplodocus.org Git - nmh/blob - test/mhshow/test-cte-binary
Close temp file.
[nmh] / test / mhshow / test-cte-binary
1 #!/bin/sh
2 ######################################################
3 #
4 # Test Content-Transfer-Encoding: binary (Debian #136976).
5 #
6 ######################################################
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 . "$MH_OBJ_DIR/test/common.sh"
14
15 setup_test
16 expected=$MH_TEST_DIR/$$.expected
17 actual=$MH_TEST_DIR/$$.actual
18
19 # Write message with Content-Transfer-Encoding: binary text.
20 msgfile=`mhpath new`
21 msgnum=`basename $msgfile`
22 cat > $msgfile <<EOF
23 Content-Transfer-Encoding: binary
24 To: bar@example.edu
25 Content-Type: text/plain
26 Subject: test
27 From: foo@example.edu
28 MIME-Version: 1.0
29 Content-Disposition: inline
30 Message-Id: <20698507875204@example.com>
31 Date: Tue, 05 Mar 2002 18:20:35 +0000
32
33 This is a test; this is the body.
34 EOF
35
36 # check it
37 cat > $expected <<EOF
38 [ Message inbox:11 ]
39 Date: Tue, 05 Mar 2002 18:20:35 +0000
40 To: bar@example.edu
41 From: foo@example.edu
42 Subject: test
43
44 MIME-Version: 1.0
45 Content-Disposition: inline
46
47 [ part - text/plain - 34B ]
48 This is a test; this is the body.
49 EOF
50 run_prog mhshow $msgnum > $actual 2>&1
51 check "$expected" "$actual" : C-T-E binary text
52
53 exit $failed
54