]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.el
test: Add `test_emacs_expect_t'.
[notmuch] / test / test-lib.el
index 59c586813d45f7f71033a6d7d87f01c62de37e79..96752f0b0e5ad33acd699550db7ef1777b00e804 100644 (file)
@@ -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))))