]>
diplodocus.org Git - nmh/blob - test/mhshow/test-textcharset
2 ##########################################################
4 # Test display of text/plain parts with charset conversion
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 if test "$ICONV_ENABLED" -eq 0; then
20 echo "$0: skipping test-textcharset because nmh was built without iconv"
24 expected
="$MH_TEST_DIR"/$$.expected
25 actual
="$MH_TEST_DIR"/$$.actual
31 Subject: test display with charset conversion
33 Content-Type: text/plain; charset=windows-1252
34 Content-Transfer-Encoding: quoted-printable
35 Date: Sun, 18 Dec 2005 00:52:39 +0100
40 # Check -notextcharset.
41 cat >"$expected" <<EOF
42 Date: Sun, 18 Dec 2005 00:52:39 +0100
45 Subject: test display with charset conversion
51 run_prog mhshow
-textcharset UTF
-8 -notextcharset -nopause last
>"$actual" 2>&1
52 check
"$expected" "$actual"
55 cat >"$expected" <<EOF
56 Date: Sun, 18 Dec 2005 00:52:39 +0100
59 Subject: test display with charset conversion
67 run_prog mhshow
-textcharset UTF
-8 -nopause last
>"$actual" 2>&1
68 check
"$expected" "$actual" 'keep first'
70 # Check use of user's locale.
71 LC_ALL
=en_US.UTF
-8; export LC_ALL
72 run_prog mhshow
-nopause last
>"$actual" 2>&1
73 check
"$expected" "$actual"