Created
September 17, 2011 01:45
-
-
Save mrc/1223517 to your computer and use it in GitHub Desktop.
ert "are" macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro are (form &rest forms) | |
"Evaluate FORM, then a list of FORMS with should. If any return | |
nil, abort the current test as failed. | |
Returns the value of the last form evaluated." | |
(let ((result (make-symbol "result"))) | |
`(progn | |
(setq ,result (should ,form)) | |
(unless (null ',forms) | |
(setq ,result (are ,@forms))) | |
,result))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Combine multiple tests using emacs ert's "should".