]> git.notmuchmail.org Git - notmuch/blobdiff - test/T455-emacs-charsets.sh
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / test / T455-emacs-charsets.sh
index 3078f9c956a0e1a3423b631ef54a9c1a6ad1980e..db03bb67ba3a70a68d0f7eb2f6c6ed104bd20808 100755 (executable)
@@ -1,12 +1,15 @@
 #!/usr/bin/env bash
 
 test_description="emacs notmuch-show charset handling"
-. ./test-lib.sh
+. $(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 <<EOF >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 <<EOF >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 <<EOF >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 <<EOF >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 <<EOF >EXPECTED
 Yen: $BIG5_YEN
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done