[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] [emacs] 01/01: Improve output of occur-tests in case of fa
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] [emacs] 01/01: Improve output of occur-tests in case of failure |
Date: |
Mon, 17 Nov 2014 18:40:06 +0000 |
branch: master
commit 83087df9492f4a16c835664aa39d0b8a7756d4bb
Author: Glenn Morris <address@hidden>
Date: Mon Nov 17 13:39:56 2014 -0500
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.
---
test/ChangeLog | 5 +++++
test/automated/occur-tests.el | 9 ++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/test/ChangeLog b/test/ChangeLog
index 47bbfb3..42fcd8e 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-17 Glenn Morris <address@hidden>
+
+ * 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 <address@hidden>
* automated/icalendar-tests.el (icalendar-tests--test-import):
diff --git a/test/automated/occur-tests.el b/test/automated/occur-tests.el
index b15e3dc..c00b71d 100644
--- a/test/automated/occur-tests.el
+++ b/test/automated/occur-tests.el
@@ -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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] [emacs] 01/01: Improve output of occur-tests in case of failure,
Glenn Morris <=