Debian Codegraph @

test/mhshow/test-cte-binary

raw
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: [email protected]
25 Content-Type: text/plain
26 Subject: test
27 From: [email protected]
28 MIME-Version: 1.0
29 Content-Disposition: inline
30 Message-Id: <[email protected]>
31 Date: Tue, 05 Mar 2002 19:20:35 +0100
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 19:20:35 +0100
40 To: [email protected]
41 From: [email protected]
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