]>
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 check_exit
'-eq 1' mhshow
- # gcov
21 require_locale en_US.UTF
-8 en_US.UTF8 en_US.utf
-8 en_US.utf8
23 test "$ICONV_ENABLED" -eq 0 && text_size
=10 || text_size
=11
25 expected
=$MH_TEST_DIR/$$.expected
26 actual
=$MH_TEST_DIR/$$.actual
28 echo 'mhshow-charset-windows-1252: echo "This is a test"' >> "$MH"
30 # Write message with bogus quoted-printable data.
31 start_test
'Write message with bogus quoted-printable data'
33 msgnum
=`basename $msgfile`
39 Content-Type: text/plain; charset=windows-1252
40 Content-Transfer-Encoding: quoted-printable
41 Content-Description: bogus quoted-printable data
42 Date: Sun, 18 Dec 2005 00:52:39 +0100
49 Date: Sun, 18 Dec 2005 00:52:39 +0100
55 Content-Description: bogus quoted-printable data
57 [ part - text/plain - bogus quoted-printable data ${text_size}B ]
61 run_prog mhshow
$msgnum > $actual 2>&1
62 check
"$expected" "$actual" 'keep first' : bogus quoted
-printable data
65 start_test
'locale profile component'
66 #### Used LC_ALL above, now use locale profile component instead.
67 printf "locale: $LC_ALL\n" >> "${MH}"
70 run_prog mhshow
$msgnum > $actual 2>&1
71 check
"$expected" "$actual" : locale profile component