+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):
(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
(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)))))
`(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))