X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/5b3c1d3f240fefc088f3dc7af3ae908cd36a1a7d..2cfa2ea56602d3bb0465a46c0b144017b497b558:/test/mhl/test-rfc6532 diff --git a/test/mhl/test-rfc6532 b/test/mhl/test-rfc6532 index bc0bdbcc..34ebdc71 100755 --- a/test/mhl/test-rfc6532 +++ b/test/mhl/test-rfc6532 @@ -16,6 +16,7 @@ fi . "${MH_OBJ_DIR}/test/common.sh" setup_test +mhl="${MH_LIBEXEC_DIR}/mhl" #### Make sure that html-to-text conversion is what we expect. require_locale en_US.utf-8 en_US.utf8 @@ -44,7 +45,7 @@ EOF #### Just check that the (UTF-8) headers are displayed unscathed. run_test #### squashes the trailing blank lines from mhl. -run_test "mhl -form mhl.headers `mhpath last`" \ +run_test "$mhl -form mhl.headers `mhpath last`" \ 'Date: 20 May 2014 14:28:51 +0200 To: recipientæ@example.com From: senderø@example.com @@ -53,5 +54,20 @@ Subject: Blåbærsyltetøy MIME-Version: 1.0' +# check with incompatible locale +# This is here as a place holder. We should either try to run the (8-bit) text +# through iconv, or refuse to display it if the locale is incompatible. In the +# cAse of EAI, that means not UTF-8. +start_test 'incompatible locale' +LC_ALL=C +run_test "$mhl -form mhl.headers `mhpath last`" \ +'Date: 20 May 2014 14:28:51 +0200 +To: recipientæ@example.com +From: sender??@example.com +Subject: Bl??b??rsyltet??y + +MIME-Version: 1.0' + + finish_test exit $failed