aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-06-24 19:24:32 -0700
committerGlenn Morris2013-06-24 19:24:32 -0700
commit51f853872f483e5726dda134a25c3c73bc712c2c (patch)
tree6ef0b9382ade37b50ba20800b8e9ac09933d11bb
parent7e3a3bb3072b68d94d1a023d3baa2bfa68c6c514 (diff)
downloademacs-51f853872f483e5726dda134a25c3c73bc712c2c.tar.gz
emacs-51f853872f483e5726dda134a25c3c73bc712c2c.zip
* test/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.
-rw-r--r--test/ChangeLog6
-rw-r--r--test/automated/occur-tests.el18
2 files changed, 18 insertions, 6 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 607be5c5244..4cacbf2766b 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
12013-06-25 Glenn Morris <rgm@gnu.org>
2
3 * automated/occur-tests.el (occur-test-create): New function.
4 Use it to create separate tests for each element, so we run them
5 all rather than stopping at the first error.
6
12013-06-24 Glenn Morris <rgm@fencepost.gnu.org> 72013-06-24 Glenn Morris <rgm@fencepost.gnu.org>
2 8
3 * automated/occur-tests.el (occur-tests): 9 * automated/occur-tests.el (occur-tests):
diff --git a/test/automated/occur-tests.el b/test/automated/occur-tests.el
index c690f4ada20..306803b7567 100644
--- a/test/automated/occur-tests.el
+++ b/test/automated/occur-tests.el
@@ -335,12 +335,18 @@ Each element has the format:
335 (and (buffer-name temp-buffer) 335 (and (buffer-name temp-buffer)
336 (kill-buffer temp-buffer))))) 336 (kill-buffer temp-buffer)))))
337 337
338(ert-deftest occur-tests () 338(defun occur-test-create (n)
339 "Test the functionality of `occur'. 339 "Create a test for element N of the `occur-tests' constant."
340The test data is in the `occur-tests' constant." 340 (let ((testname (intern (format "occur-test-%.2d" n)))
341 (let ((occur-hook nil)) 341 (testdoc (format "Test element %d of `occur-tests'." n)))
342 (dolist (test occur-tests) 342 (eval
343 (should (occur-test-case test))))) 343 `(ert-deftest ,testname ()
344 ,testdoc
345 (let (occur-hook)
346 (should (occur-test-case (nth ,n occur-tests))))))))
347
348(dotimes (i (length occur-tests))
349 (occur-test-create i))
344 350
345(provide 'occur-tests) 351(provide 'occur-tests)
346 352