X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT455-emacs-charsets.sh;h=db03bb67ba3a70a68d0f7eb2f6c6ed104bd20808;hb=2d036dbc3b6e48b12ab3e8aa0cbe713d2ef96854;hp=7624fa4d10a645b8b8c5d636e76370b4a7904030;hpb=33c8777a967ece2dd4bbda7e83a4e07c195abf51;p=notmuch diff --git a/test/T455-emacs-charsets.sh b/test/T455-emacs-charsets.sh index 7624fa4d..db03bb67 100755 --- a/test/T455-emacs-charsets.sh +++ b/test/T455-emacs-charsets.sh @@ -1,12 +1,15 @@ #!/usr/bin/env bash test_description="emacs notmuch-show charset handling" -. ./test-lib.sh || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 +. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1 UTF8_YEN=$'\xef\xbf\xa5' BIG5_YEN=$'\xa2\x44' +test_require_emacs + # Add four messages with unusual encoding requirements: # # 1) text/plain in quoted-printable big5 @@ -48,7 +51,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT cat <EXPECTED Yen: $UTF8_YEN EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "8bit text parts are decoded when rendering" test_emacs '(notmuch-show "id:test-plain-8bit@example.com") @@ -57,7 +60,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT cat <EXPECTED Yen: $UTF8_YEN EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "HTML parts are decoded when rendering" test_emacs '(notmuch-show "id:test-html@example.com") @@ -67,7 +70,7 @@ cat <EXPECTED [ text/html ] Yen: $UTF8_YEN EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT # Test saving @@ -125,7 +128,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT cat <EXPECTED Yen: =A2=44 EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "8bit text message are not decoded when viewing" test_emacs '(notmuch-show "id:test-plain-8bit@example.com") @@ -135,6 +138,6 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT cat <EXPECTED Yen: $BIG5_YEN EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_done