]>
diplodocus.org Git - nmh/blob - test/mhl/test-format
3 # Test mhl.headers, at least.
7 if test -z "${MH_OBJ_DIR}"; then
8 srcdir
=`dirname "$0"`/..
/..
9 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
12 .
"$MH_OBJ_DIR/test/common.sh"
14 require_locale en_US.UTF
-8 en_US.UTF8 en_US.utf
-8 en_US.utf8
17 mhl
="${MH_LIBEXEC_DIR}/mhl"
18 expected
="$MH_TEST_DIR/$$.expected"
19 actual
="$MH_TEST_DIR/$$.actual"
21 # check decode of To: and Cc:
22 start_test
"decode of To: and Cc:"
23 cat >"$expected" <<EOF
24 Resent-To: Encoded ! <encoded_exclamation@example.com>
25 Resent-cc: Encoded , <encoded_comma@example.com>
26 Resent-From: Encoded . <encoded_period@example.com>
27 Date: Sat, 13 Jul 2019 16:02:39
28 To: Encoded + <encoded_plus@example.com>,
29 Encoded # <encoded_hash@example.com>
30 cc: Encoded - <encoded_minus@example.com>
31 From: Encoded * <encoded_asterisk@example.com>
32 Subject: encoded addresses
37 cat >"`mhpath new`" <<EOF
38 Resent-To: "Encoded =?utf-8?Q?=21?=" <encoded_exclamation@example.com>
39 Resent-cc: "Encoded =?utf-8?Q?=2c?=" <encoded_comma@example.com>
40 Resent-From: "Encoded =?utf-8?Q?=2e?=" <encoded_period@example.com>
41 To: "Encoded =?utf-8?Q?=2b?=" <encoded_plus@example.com>,
42 "Encoded =?utf-8?Q?=23?=" <encoded_hash@example.com>
43 Cc: "Encoded =?utf-8?Q?=2d?=" <encoded_minus@example.com>
44 From: "Encoded =?utf-8?Q?=2a?=" <encoded_asterisk@example.com>
45 Date: Sat, 13 Jul 2019 16:02:39
46 Subject: encoded addresses
49 "$mhl" -nomoreproc -form mhl.headers
`mhpath last` >"$actual"
50 check
"$expected" "$actual"