mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-24 13:57:36 +00:00
Improve output of occur-tests in case of failure
* test/automated/occur-tests.el (occur-test-case, occur-test-create): In case of failure, show the actual string, rather than just nil.
This commit is contained in:
parent
62243cb96f
commit
83087df949
2 changed files with 9 additions and 5 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2014-11-17 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* automated/occur-tests.el (occur-test-case, occur-test-create):
|
||||
In case of failure, show the actual string, rather than just nil.
|
||||
|
||||
2014-11-17 Ulf Jasper <ulf.jasper@web.de>
|
||||
|
||||
* automated/icalendar-tests.el (icalendar-tests--test-import):
|
||||
|
|
|
|||
|
|
@ -321,7 +321,6 @@ Each element has the format:
|
|||
(let ((regexp (nth 0 test))
|
||||
(nlines (nth 1 test))
|
||||
(input-buffer-string (nth 2 test))
|
||||
(output-buffer-string (nth 3 test))
|
||||
(temp-buffer (get-buffer-create " *test-occur*")))
|
||||
(unwind-protect
|
||||
(save-window-excursion
|
||||
|
|
@ -329,9 +328,8 @@ Each element has the format:
|
|||
(erase-buffer)
|
||||
(insert input-buffer-string)
|
||||
(occur regexp nlines)
|
||||
(equal output-buffer-string
|
||||
(with-current-buffer "*Occur*"
|
||||
(buffer-string)))))
|
||||
(with-current-buffer "*Occur*"
|
||||
(buffer-substring-no-properties (point-min) (point-max)))))
|
||||
(and (buffer-name temp-buffer)
|
||||
(kill-buffer temp-buffer)))))
|
||||
|
||||
|
|
@ -343,7 +341,8 @@ Each element has the format:
|
|||
`(ert-deftest ,testname ()
|
||||
,testdoc
|
||||
(let (occur-hook)
|
||||
(should (occur-test-case (nth ,n occur-tests))))))))
|
||||
(should (equal (occur-test-case (nth ,n occur-tests))
|
||||
(nth 3 (nth ,n occur-tests)))))))))
|
||||
|
||||
(dotimes (i (length occur-tests))
|
||||
(occur-test-create i))
|
||||
|
|
|
|||
Loading…
Reference in a new issue