aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test-lib.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-lib.el')
-rw-r--r--test/test-lib.el9
1 files changed, 9 insertions, 0 deletions
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))))