(define-derived-mode ert-results-mode special-mode "ERT-Results"
"Major mode for viewing results of ERT test runs."
+ :interactive nil
(setq-local revert-buffer-function
(lambda (&rest _) (ert-results-rerun-all-tests))))
"Move point to the next test.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-next
"No tests below"))
"Move point to the previous test.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-prev
"No tests above"))
"Find the definition of the test at point in another window.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(let ((name (ert-test-at-point)))
(unless name
(user-error "No test at point"))
;; 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)
+ (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)
"Re-run all tests, using the same selector.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(cl-assert (eql major-mode 'ert-results-mode))
(let ((selector (ert--stats-selector ert--results-stats)))
(ert-run-tests-interactively selector (buffer-name))))
"Re-run the test at point.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(cl-destructuring-bind (test redefinition-state)
(ert--results-test-at-point-allow-redefinition)
(when (null test)
"Re-run the test at point with `ert-debug-on-error' bound to t.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(let ((ert-debug-on-error t))
(ert-results-rerun-test-at-point)))
"Display the backtrace for the test at point.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(let* ((test (ert--results-test-at-point-no-redefinition t))
(stats ert--results-stats)
(pos (ert--stats-test-pos stats test))
"Display the part of the *Messages* buffer generated during the test at point.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(let* ((test (ert--results-test-at-point-no-redefinition t))
(stats ert--results-stats)
(pos (ert--stats-test-pos stats test))
"Display the list of `should' forms executed during the test at point.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(let* ((test (ert--results-test-at-point-no-redefinition t))
(stats ert--results-stats)
(pos (ert--stats-test-pos stats test))
"Toggle how much of the condition to print for the test at point.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(let* ((ewoc ert--results-ewoc)
(node (ert--results-test-node-at-point))
(entry (ewoc-data node)))
"Display test timings for the last run.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(let* ((stats ert--results-stats)
(buffer (get-buffer-create "*ERT timings*"))
(data (cl-loop for test across (ert--stats-tests stats)
"Display the documentation of the test at point.
To be used in the ERT results buffer."
- (interactive)
+ (interactive nil ert-results-mode)
(ert-describe-test (ert--results-test-at-point-no-redefinition t)))