]>
diplodocus.org Git - nmh/blob - test/mhshow/test-binary
2 ######################################################
4 # Test MIME parser on binary input
6 ######################################################
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir
=`dirname "$0"`/..
/..
12 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
15 .
"$MH_OBJ_DIR/test/common.sh"
19 actual
="$MH_TEST_DIR/test-binary$$.actual"
20 expected
="$MH_TEST_DIR/test-binary$$.expected"
22 printf '%s\000%s' >"${expected}" \
24 To: recipient@example.edu
25 From: sender@example.edu
26 Subject: test binary content
30 [ part - text/plain - 23B ]
31 Here's a null byte: " ".
34 printf '%s\000%s' >`mhpath new` \
35 "From: sender@example.edu
36 To: recipient@example.edu
37 Subject: test binary content
39 Content-Type: text/plain; charset=UTF-8
40 Content-Transfer-Encoding: binary
42 Here's a null byte: " ".
45 run_prog mhshow last
>"${actual}" 2>&1
46 check
"${expected}" "${actual}"