File: test-cte-binary

package info (click to toggle)
mmh 0.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 4,976 kB
  • sloc: ansic: 26,132; sh: 6,871; makefile: 680; awk: 74
file content (39 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
######################################################
#
# Test Content-Transfer-Encoding: binary (Debian #136976).
#
######################################################

expected=$MH_TEST_DIR/$$.expected
actual=$MH_TEST_DIR/$$.actual

# Write message with Content-Transfer-Encoding: binary text.
msgfile=$(mhpath b)
msgnum=$(basename $msgfile)
cat > $msgfile <<EOF
Content-Transfer-Encoding: binary
To: bar@example.edu
Content-Type: text/plain
Subject: test
From: foo@example.edu
MIME-Version: 1.0
Content-Disposition: inline
Message-Id: <20698507875204@example.com>
Date: Tue, 05 Mar 2002 18:20:35 +0000

This is a test; this is the body.
EOF

# check it
cat > $expected <<EOF
Date:    Tue, 05 Mar 2002 18:20:35 +0000
From:    foo@example.edu
To:      bar@example.edu
Subject: test

part       text/plain                  34
This is a test; this is the body.
EOF
show $msgnum > $actual 2>&1
diff -u $expected $actual