aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier2012-06-27 11:11:28 -0400
committerStefan Monnier2012-06-27 11:11:28 -0400
commitd5c6faf921772e523fc224333d8af142c830a7e6 (patch)
treec56d324652a27862cad6eaa553017b6f8ffef5c1 /test
parent7b953864bad04a37e9cc0e0de4328caf1b4c400e (diff)
downloademacs-d5c6faf921772e523fc224333d8af142c830a7e6.tar.gz
emacs-d5c6faf921772e523fc224333d8af142c830a7e6.zip
* lisp/emacs-lisp/cl.el (flet): Mark obsolete.
* lisp/emacs-lisp/cl-macs.el (cl-flet*): New macro. * lisp/vc/vc-rcs.el (vc-rcs-annotate-command, vc-rcs-parse): * lisp/progmodes/js.el (js-c-fill-paragraph): * lisp/progmodes/ebrowse.el (ebrowse-switch-member-buffer-to-sibling-class) (ebrowse-switch-member-buffer-to-derived-class): * test/automated/ert-x-tests.el (ert-test-run-tests-interactively-2): * lisp/play/5x5.el (5x5-solver): Use cl-flet. Fixes: debbugs:11780
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog15
-rw-r--r--test/automated/ert-x-tests.el146
2 files changed, 83 insertions, 78 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index ddd26bf492a..45fc70e0440 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,7 +1,12 @@
12012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * automated/ert-x-tests.el (ert-test-run-tests-interactively-2):
4 Use cl-flet.
5
12012-06-08 Ulf Jasper <ulf.jasper@web.de> 62012-06-08 Ulf Jasper <ulf.jasper@web.de>
2 7
3 * automated/icalendar-tests.el (icalendar--parse-vtimezone): Test 8 * automated/icalendar-tests.el (icalendar--parse-vtimezone):
4 escaped commas in TZID (Bug#11473). 9 Test escaped commas in TZID (Bug#11473).
5 (icalendar-import-with-timezone): New. 10 (icalendar-import-with-timezone): New.
6 (icalendar-real-world): Add new testcase as given in the bugreport 11 (icalendar-real-world): Add new testcase as given in the bugreport
7 of Bug#11473. 12 of Bug#11473.
@@ -332,8 +337,8 @@
3322009-12-18 Ulf Jasper <ulf.jasper@web.de> 3372009-12-18 Ulf Jasper <ulf.jasper@web.de>
333 338
334 * icalendar-testsuite.el 339 * icalendar-testsuite.el
335 (icalendar-testsuite--run-function-tests): Add 340 (icalendar-testsuite--run-function-tests):
336 icalendar-testsuite--test-parse-vtimezone. 341 Add icalendar-testsuite--test-parse-vtimezone.
337 (icalendar-testsuite--test-parse-vtimezone): New. 342 (icalendar-testsuite--test-parse-vtimezone): New.
338 (icalendar-testsuite--do-test-cycle): Doc changes. 343 (icalendar-testsuite--do-test-cycle): Doc changes.
339 (icalendar-testsuite--run-real-world-tests): Remove trailing 344 (icalendar-testsuite--run-real-world-tests): Remove trailing
@@ -375,7 +380,7 @@
3752008-10-31 Ulf Jasper <ulf.jasper@web.de> 3802008-10-31 Ulf Jasper <ulf.jasper@web.de>
376 381
377 * icalendar-testsuite.el (icalendar-testsuite--run-function-tests): 382 * icalendar-testsuite.el (icalendar-testsuite--run-function-tests):
378 Added `icalendar-testsuite--test-create-uid'. 383 Add `icalendar-testsuite--test-create-uid'.
379 (icalendar-testsuite--test-create-uid): New. 384 (icalendar-testsuite--test-create-uid): New.
380 385
3812008-06-14 Ulf Jasper <ulf.jasper@web.de> 3862008-06-14 Ulf Jasper <ulf.jasper@web.de>
diff --git a/test/automated/ert-x-tests.el b/test/automated/ert-x-tests.el
index bb05608e418..520502bb307 100644
--- a/test/automated/ert-x-tests.el
+++ b/test/automated/ert-x-tests.el
@@ -103,79 +103,79 @@
103 103
104(ert-deftest ert-test-run-tests-interactively-2 () 104(ert-deftest ert-test-run-tests-interactively-2 ()
105 :tags '(:causes-redisplay) 105 :tags '(:causes-redisplay)
106 (let ((passing-test (make-ert-test :name 'passing-test 106 (let* ((passing-test (make-ert-test :name 'passing-test
107 :body (lambda () (ert-pass)))) 107 :body (lambda () (ert-pass))))
108 (failing-test (make-ert-test :name 'failing-test 108 (failing-test (make-ert-test :name 'failing-test
109 :body (lambda () 109 :body (lambda ()
110 (ert-info ((propertize "foo\nbar" 110 (ert-info ((propertize "foo\nbar"
111 'a 'b)) 111 'a 'b))
112 (ert-fail 112 (ert-fail
113 "failure message")))))) 113 "failure message")))))
114 (let ((ert-debug-on-error nil)) 114 (ert-debug-on-error nil)
115 (let* ((buffer-name (generate-new-buffer-name "*ert-test-run-tests*")) 115 (buffer-name (generate-new-buffer-name "*ert-test-run-tests*"))
116 (messages nil) 116 (messages nil)
117 (mock-message-fn 117 (mock-message-fn
118 (lambda (format-string &rest args) 118 (lambda (format-string &rest args)
119 (push (apply #'format format-string args) messages)))) 119 (push (apply #'format format-string args) messages))))
120 (flet ((expected-string (with-font-lock-p) 120 (cl-flet ((expected-string (with-font-lock-p)
121 (ert-propertized-string 121 (ert-propertized-string
122 "Selector: (member <passing-test> <failing-test>)\n" 122 "Selector: (member <passing-test> <failing-test>)\n"
123 "Passed: 1\n" 123 "Passed: 1\n"
124 "Failed: 1 (1 unexpected)\n" 124 "Failed: 1 (1 unexpected)\n"
125 "Total: 2/2\n\n" 125 "Total: 2/2\n\n"
126 "Started at:\n" 126 "Started at:\n"
127 "Finished.\n" 127 "Finished.\n"
128 "Finished at:\n\n" 128 "Finished at:\n\n"
129 `(category ,(button-category-symbol 129 `(category ,(button-category-symbol
130 'ert--results-progress-bar-button) 130 'ert--results-progress-bar-button)
131 button (t) 131 button (t)
132 face ,(if with-font-lock-p 132 face ,(if with-font-lock-p
133 'ert-test-result-unexpected 133 'ert-test-result-unexpected
134 'button)) 134 'button))
135 ".F" nil "\n\n" 135 ".F" nil "\n\n"
136 `(category ,(button-category-symbol 136 `(category ,(button-category-symbol
137 'ert--results-expand-collapse-button) 137 'ert--results-expand-collapse-button)
138 button (t) 138 button (t)
139 face ,(if with-font-lock-p 139 face ,(if with-font-lock-p
140 'ert-test-result-unexpected 140 'ert-test-result-unexpected
141 'button)) 141 'button))
142 "F" nil " " 142 "F" nil " "
143 `(category ,(button-category-symbol 143 `(category ,(button-category-symbol
144 'ert--test-name-button) 144 'ert--test-name-button)
145 button (t) 145 button (t)
146 ert-test-name failing-test) 146 ert-test-name failing-test)
147 "failing-test" 147 "failing-test"
148 nil "\n Info: " '(a b) "foo\n" 148 nil "\n Info: " '(a b) "foo\n"
149 nil " " '(a b) "bar" 149 nil " " '(a b) "bar"
150 nil "\n (ert-test-failed \"failure message\")\n\n\n" 150 nil "\n (ert-test-failed \"failure message\")\n\n\n"
151 ))) 151 )))
152 (save-window-excursion 152 (save-window-excursion
153 (unwind-protect 153 (unwind-protect
154 (let ((case-fold-search nil)) 154 (let ((case-fold-search nil))
155 (ert-run-tests-interactively 155 (ert-run-tests-interactively
156 `(member ,passing-test ,failing-test) buffer-name 156 `(member ,passing-test ,failing-test) buffer-name
157 mock-message-fn) 157 mock-message-fn)
158 (should (equal messages `(,(concat 158 (should (equal messages `(,(concat
159 "Ran 2 tests, 1 results were " 159 "Ran 2 tests, 1 results were "
160 "as expected, 1 unexpected")))) 160 "as expected, 1 unexpected"))))
161 (with-current-buffer buffer-name 161 (with-current-buffer buffer-name
162 (font-lock-mode 0) 162 (font-lock-mode 0)
163 (should (ert-equal-including-properties 163 (should (ert-equal-including-properties
164 (ert-filter-string (buffer-string) 164 (ert-filter-string (buffer-string)
165 '("Started at:\\(.*\\)$" 1) 165 '("Started at:\\(.*\\)$" 1)
166 '("Finished at:\\(.*\\)$" 1)) 166 '("Finished at:\\(.*\\)$" 1))
167 (expected-string nil))) 167 (expected-string nil)))
168 ;; `font-lock-mode' only works if interactive, so 168 ;; `font-lock-mode' only works if interactive, so
169 ;; pretend we are. 169 ;; pretend we are.
170 (let ((noninteractive nil)) 170 (let ((noninteractive nil))
171 (font-lock-mode 1)) 171 (font-lock-mode 1))
172 (should (ert-equal-including-properties 172 (should (ert-equal-including-properties
173 (ert-filter-string (buffer-string) 173 (ert-filter-string (buffer-string)
174 '("Started at:\\(.*\\)$" 1) 174 '("Started at:\\(.*\\)$" 1)
175 '("Finished at:\\(.*\\)$" 1)) 175 '("Finished at:\\(.*\\)$" 1))
176 (expected-string t))))) 176 (expected-string t)))))
177 (when (get-buffer buffer-name) 177 (when (get-buffer buffer-name)
178 (kill-buffer buffer-name))))))))) 178 (kill-buffer buffer-name)))))))
179 179
180(ert-deftest ert-test-describe-test () 180(ert-deftest ert-test-describe-test ()
181 "Tests `ert-describe-test'." 181 "Tests `ert-describe-test'."