X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Femacs;h=75a0a7442f4b46921afa698f1bde9732e8482895;hp=76b18e7dd4fe974e192fd017284178fc04b05aad;hb=28d78c2b02ade16d5e5b8a0bc021acb5158ba777;hpb=968965635197a6646688c0edd759f0c4f74181cb diff --git a/test/emacs b/test/emacs index 76b18e7d..75a0a744 100755 --- a/test/emacs +++ b/test/emacs @@ -256,13 +256,13 @@ test_begin_subtest "Save attachment from within emacs using notmuch-show-save-at # save as archive to test that Emacs does not re-compress .gz test_emacs '(let ((standard-input "\"attachment1.gz\"")) (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") - (notmuch-show-save-attachments))' > /dev/null 2>&1 + (notmuch-show-save-attachments))' test_expect_equal_file attachment1.gz "$EXPECTED/attachment" test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part" # save as archive to test that Emacs does not re-compress .gz test_emacs '(let ((standard-input "\"attachment2.gz\"")) - (notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))' > /dev/null 2>&1 + (notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))' test_expect_equal_file attachment2.gz "$EXPECTED/attachment" test_begin_subtest "View raw message within emacs" @@ -342,6 +342,47 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail. (test-visible-output)' test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages +test_begin_subtest "Stashing in notmuch-show" +add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \ + '[from]="Some One "' \ + '[to]="Some One Else "' \ + '[cc]="Notmuch "' \ + '[subject]="Stash my stashables"' \ + '[id]="bought"' \ + '[body]="Unable to stash body. Where did you get it in the first place?!?"' +notmuch tag +stashtest id:${gen_msg_id} +test_emacs '(notmuch-show "id:\"bought\"") + (notmuch-show-stash-date) + (notmuch-show-stash-from) + (notmuch-show-stash-to) + (notmuch-show-stash-cc) + (notmuch-show-stash-subject) + (notmuch-show-stash-message-id) + (notmuch-show-stash-message-id-stripped) + (notmuch-show-stash-tags) + (notmuch-show-stash-filename) + (switch-to-buffer + (generate-new-buffer "*test-stashing*")) + (dotimes (i 9) + (yank) + (insert "\n") + (rotate-yank-pointer 1)) + (reverse-region (point-min) (point-max)) + (test-output)' +sed -i -e 's/^.*tmp.emacs\/mail.*$/FILENAME/' OUTPUT +test_expect_equal_file OUTPUT $EXPECTED/emacs-stashing + +test_begin_subtest "Stashing in notmuch-search" +test_emacs '(notmuch-search "id:\"bought\"") + (notmuch-test-wait) + (notmuch-search-stash-thread-id) + (switch-to-buffer + (generate-new-buffer "*test-stashing*")) + (yank) + (test-output)' +sed -i -e 's/^thread:.*$/thread:XXX/' OUTPUT +test_expect_equal $(cat OUTPUT) "thread:XXX" + test_begin_subtest 'Hiding message following HTML part' test_subtest_known_broken id='html-message@notmuchmail.org' @@ -369,7 +410,6 @@ test_emacs "(notmuch-show \"id:$id\") \ test_expect_equal_file OUTPUT EXPECTED test_begin_subtest 'notmuch-show-advance-and-archive with invisible signature' -test_subtest_known_broken message1='id:20091118010116.GC25380@dottiness.seas.harvard.edu' message2='id:1258491078-29658-1-git-send-email-dottedmag@dottedmag.net' test_emacs "(notmuch-search \"$message1 or $message2\")