[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113164: * test/automated/occur-tests.el (occur-test
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r113164: * test/automated/occur-tests.el (occur-test-create): New function. |
Date: |
Tue, 25 Jun 2013 02:24:37 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113164
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2013-06-24 19:24:32 -0700
message:
* 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.
modified:
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
test/automated/occur-tests.el
occurtestsuite.el-20100323161552-5mobrc3sdoqn2ad1-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2013-06-24 23:52:33 +0000
+++ b/test/ChangeLog 2013-06-25 02:24:32 +0000
@@ -1,3 +1,9 @@
+2013-06-25 Glenn Morris <address@hidden>
+
+ * 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 <address@hidden>
* automated/occur-tests.el (occur-tests):
=== modified file 'test/automated/occur-tests.el'
--- a/test/automated/occur-tests.el 2013-06-24 23:52:33 +0000
+++ b/test/automated/occur-tests.el 2013-06-25 02:24:32 +0000
@@ -335,12 +335,18 @@
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113164: * test/automated/occur-tests.el (occur-test-create): New function.,
Glenn Morris <=