Function: ert-results-jump-between-summary-and-result
ert-results-jump-between-summary-and-result is an interactive and
byte-compiled function defined in ert.el.gz.
Signature
(ert-results-jump-between-summary-and-result)
Documentation
Jump back and forth between the test run summary and individual test results.
From an ewoc node, jumps to the character that represents the same test in the progress bar, and vice versa.
To be used in the ERT results buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert.el.gz
(defun ert-results-jump-between-summary-and-result ()
"Jump back and forth between the test run summary and individual test results.
From an ewoc node, jumps to the character that represents the
same test in the progress bar, and vice versa.
To be used in the ERT results buffer."
;; Maybe this command isn't actually needed much, but if it is, it
;; seems like an indication that the UI design is not optimal. If
;; jumping back and forth between a summary at the top of the buffer
;; and the error log in the remainder of the buffer is useful, then
;; the summary apparently needs to be easily accessible from the
;; error log, and perhaps it would be better to have it in a
;; separate buffer to keep it visible.
(interactive nil ert-results-mode)
(let ((ewoc ert--results-ewoc)
(progress-bar-begin ert--results-progress-bar-button-begin))
(cond ((ert--results-test-node-or-null-at-point)
(let* ((node (ert--results-test-node-at-point))
(pos (ert--ewoc-position ewoc node)))
(goto-char (+ progress-bar-begin pos))))
((and (<= progress-bar-begin (point))
(< (point) (button-end (button-at progress-bar-begin))))
(let* ((node (ewoc-nth ewoc (- (point) progress-bar-begin)))
(entry (ewoc-data node)))
(when (ert--ewoc-entry-hidden-p entry)
(setf (ert--ewoc-entry-hidden-p entry) nil)
(ewoc-invalidate ewoc node))
(ewoc-goto-node ewoc node)))
(t
(goto-char progress-bar-begin)))))