X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT310-emacs.sh;h=78ac19a8655c150bd428657fcd387336b7b689d4;hb=15d8067c0a209a24d757b416107d92007529f01f;hp=d743abb75211657e9a635acc1cc886c7b9815d4e;hpb=4e213fe9b4332deb3f11f1dbc71cbdd47a8a1525;p=notmuch diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index d743abb7..78ac19a8 100755 --- a/test/T310-emacs.sh +++ b/test/T310-emacs.sh @@ -40,12 +40,14 @@ test_emacs '(notmuch-search "tag:inbox") test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox OUTPUT test_begin_subtest "Incremental parsing of search results" -test_emacs "(ad-enable-advice 'notmuch-search-process-filter 'around 'pessimal) - (ad-activate 'notmuch-search-process-filter) - (notmuch-search \"tag:inbox\") - (notmuch-test-wait) - (ad-disable-advice 'notmuch-search-process-filter 'around 'pessimal) - (ad-activate 'notmuch-search-process-filter) +test_emacs "(cl-letf* (((symbol-function 'orig) + (symbol-function 'notmuch-search-process-filter)) + ((symbol-function 'notmuch-search-process-filter) + (lambda (proc string) + (cl-loop for char across string + do (orig proc (char-to-string char)))))) + (notmuch-search \"tag:inbox\") + (notmuch-test-wait)) (test-output)" test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox OUTPUT @@ -86,14 +88,13 @@ test_emacs "(let ((notmuch-show-indent-messages-width 4)) test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation OUTPUT test_begin_subtest "notmuch-show for message with invalid From" -test_subtest_broken_gmime_3 add_message "[subject]=\"message-with-invalid-from\"" \ "[from]=\"\\\"Invalid \\\" From\\\" \"" thread=$(notmuch search --output=threads subject:message-with-invalid-from) test_emacs "(notmuch-show \"$thread\") (test-output \"OUTPUT.raw\")" cat <EXPECTED -"Invalid " (2001-01-05) (inbox) +Invalid " From (2001-01-05) (inbox) Subject: message-with-invalid-from To: Notmuch Test Suite Date: GENERATED_DATE @@ -610,7 +611,7 @@ test_emacs "(let ((message-hidden-headers '())) (test-output))" cat <EXPECTED From: Notmuch Test Suite -To: +To: test_suite@notmuchmail.org Subject: Re: Reply within emacs to an html-only message In-Reply-To: <${gen_msg_id}> Fcc: ${MAIL_DIR}/sent @@ -623,7 +624,6 @@ EOF test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "Reply within emacs to message from self" -test_subtest_known_broken add_message '[from]="test_suite@notmuchmail.org"' \ '[to]="test_suite@notmuchmail.org"' test_emacs "(let ((message-hidden-headers '())) @@ -657,7 +657,7 @@ test_emacs "(let ((message-hidden-headers '())) (test-output))" cat <EXPECTED From: Notmuch Test Suite -To: +To: test_suite@notmuchmail.org Subject: Re: Quote MML tags in reply In-Reply-To: Fcc: ${MAIL_DIR}/sent @@ -1107,7 +1107,6 @@ output=$(test_emacs "(mapcar 'notmuch-escape-boolean-term (list test_expect_equal "$output" '("\"\"" "abc`~!@#$%^&*-=_+123" "\"(abc\"" "\")abc\"" "\"\"\"abc\"" "\"'$'\x01''xyz\"" "\"“xyz”\"")' test_begin_subtest "Sending a message calls the send message hooks" -test_subtest_known_broken emacs_deliver_message \ 'Testing message sending hooks' \ 'This is a test of the message sending hooks.' \