unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 604a16e525be6baabe7d935474c2152047427f94 751 bytes (raw)
name: test/emacs-attachment-test.el 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
(defun single-test (bodytext)
  (set-buffer (get-buffer-create "result"))
  (delete-region (point-min) (point-max))
  (insert (save-excursion
	    (single-test1 bodytext))
	  "\n"))

(defun single-test1 (bodytext)
  "Test `notmuch-mua-attachment-check' using a message consisting of BODYTEXT.

Return 'okay' if the message would be sent, otherwise 'not
okay!'"
  (notmuch-mua-mail)
  (message-goto-body)
  (insert bodytext)
  (prog1
      (condition-case detail
	  ;; Force `y-or-n-p' to always return `nil', as if the user
	  ;; pressed "n".
	  (letf (((symbol-function 'y-or-n-p) (lambda (&rest args) nil)))
	    (notmuch-mua-attachment-check)
	    "okay")
	('error "not okay!"))
    (set-buffer-modified-p nil)
    (kill-buffer (current-buffer))))

debug log:

solving 604a16e5 ...
found 604a16e5 in https://yhetil.org/notmuch/20180906181456.21719-3-dme@dme.org/

applying [1/1] https://yhetil.org/notmuch/20180906181456.21719-3-dme@dme.org/
diff --git a/test/emacs-attachment-test.el b/test/emacs-attachment-test.el
new file mode 100644
index 00000000..604a16e5

Checking patch test/emacs-attachment-test.el...
Applied patch test/emacs-attachment-test.el cleanly.

index at:
100644 604a16e525be6baabe7d935474c2152047427f94	test/emacs-attachment-test.el

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).