X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=test%2FT630-emacs-draft.sh;h=c443f417c40824786b3fdd38bf7f6f5e2e509039;hb=HEAD;hp=cd9e33a7c4057505986338b8716fd231b30e8643;hpb=70c6ac377b29fd17d62d97d13a4c5223bf7785cb;p=notmuch diff --git a/test/T630-emacs-draft.sh b/test/T630-emacs-draft.sh index cd9e33a7..1fad58a8 100755 --- a/test/T630-emacs-draft.sh +++ b/test/T630-emacs-draft.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash test_description="Emacs Draft Handling" -. ./test-lib.sh || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 +. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1 +test_require_emacs add_email_corpus notmuch config set search.exclude_tags deleted @@ -69,4 +71,36 @@ Fcc: MAIL_DIR/sent <#secure method=pgpmime mode=sign> EOF test_expect_equal_file EXPECTED OUTPUT.clean + +add_email_corpus attachment +test_begin_subtest "Saving a draft keeps hidden headers" +test_emacs '(notmuch-mua-new-reply "id:874llc2bkp.fsf@curie.anarc.at") + (message-goto-subject) + (delete-line) + (insert "Subject: draft-test-reply\n") + (test-output "DRAFT") + (notmuch-draft-postpone) + (notmuch-show "subject:draft-test-reply") + (notmuch-show-resume-message) + (test-output)' +notmuch_dir_sanitize OUTPUT > OUTPUT.clean + +cat < EXPECTED +References: <87d10042pu.fsf@curie.anarc.at> <87woy8vx7i.fsf@tesseract.cs.unb.ca> <87a7v42bv9.fsf@curie.anarc.at> <874llc2bkp.fsf@curie.anarc.at> +From: Notmuch Test Suite +To: Antoine Beaupré +Subject: draft-test-reply +In-Reply-To: <874llc2bkp.fsf@curie.anarc.at> +Fcc: MAIL_DIR/sent +--text follows this line-- +Antoine Beaupré writes: + +> And obviously I forget the frigging attachment. +> +> +> PS: don't we have a "you forgot to actually attach the damn file" plugin +> when we detect the word "attachment" and there's no attach? :p +EOF +test_expect_equal_file EXPECTED OUTPUT.clean + test_done