]>
diplodocus.org Git - nmh/blob - test/mhshow/test-charset
2 ######################################################
4 # Test charset conversion functionality
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 require_locale en_US.UTF
-8 en_US.UTF8 en_US.utf
-8 en_US.utf8
21 test "$ICONV_ENABLED" -eq 0 && text_size
=10 || text_size
=11
23 expected
=$MH_TEST_DIR/$$.expected
24 actual
=$MH_TEST_DIR/$$.actual
26 echo 'mhshow-charset-windows-1252: echo "This is a test"' >> "$MH"
28 # Write message with bogus quoted-printable data.
29 start_test
'Write message with bogus quoted-printable data'
31 msgnum
=`basename $msgfile`
37 Content-Type: text/plain; charset=windows-1252
38 Content-Transfer-Encoding: quoted-printable
39 Content-Description: bogus quoted-printable data
40 Date: Sun, 18 Dec 2005 00:52:39 +0100
47 Date: Sun, 18 Dec 2005 00:52:39 +0100
53 Content-Description: bogus quoted-printable data
55 [ part - text/plain - bogus quoted-printable data ${text_size}B ]
59 run_prog mhshow
$msgnum > $actual 2>&1
60 check
"$expected" "$actual" 'keep first' : bogus quoted
-printable data
63 start_test
'locale profile component'
64 #### Used LC_ALL above, now use locale profile component instead.
65 printf "locale: $LC_ALL\n" >> "${MH}"
68 run_prog mhshow
$msgnum > $actual 2>&1
69 check
"$expected" "$actual" : locale profile component