X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Ftest-lib.el;h=96752f0b0e5ad33acd699550db7ef1777b00e804;hp=59c586813d45f7f71033a6d7d87f01c62de37e79;hb=260975e8aff635b6b99db835ee8d40ec33ee916c;hpb=2903b32f79dcf7789a2b015c48194cb40ac71462 diff --git a/test/test-lib.el b/test/test-lib.el index 59c58681..96752f0b 100644 --- a/test/test-lib.el +++ b/test/test-lib.el @@ -83,3 +83,12 @@ nothing." (add-hook-counter 'notmuch-hello-mode-hook) (add-hook-counter 'notmuch-hello-refresh-hook) + +(defmacro notmuch-test-run (&rest body) + "Evaluate a BODY of test expressions and output the result." + `(with-temp-buffer + (let ((result (progn ,@body))) + (insert (if (stringp result) + result + (prin1-to-string result))) + (test-output))))