+2013-06-25 Glenn Morris <rgm@gnu.org>
+
+ * automated/occur-tests.el (occur-test-create): New function.
+ Use it to create separate tests for each element, so we run them
+ all rather than stopping at the first error.
+
2013-06-24 Glenn Morris <rgm@fencepost.gnu.org>
* automated/occur-tests.el (occur-tests):
(and (buffer-name temp-buffer)
(kill-buffer temp-buffer)))))
-(ert-deftest occur-tests ()
- "Test the functionality of `occur'.
-The test data is in the `occur-tests' constant."
- (let ((occur-hook nil))
- (dolist (test occur-tests)
- (should (occur-test-case test)))))
+(defun occur-test-create (n)
+ "Create a test for element N of the `occur-tests' constant."
+ (let ((testname (intern (format "occur-test-%.2d" n)))
+ (testdoc (format "Test element %d of `occur-tests'." n)))
+ (eval
+ `(ert-deftest ,testname ()
+ ,testdoc
+ (let (occur-hook)
+ (should (occur-test-case (nth ,n occur-tests))))))))
+
+(dotimes (i (length occur-tests))
+ (occur-test-create i))
(provide 'occur-tests)