Function: ert--results-test-at-point-allow-redefinition
ert--results-test-at-point-allow-redefinition is a byte-compiled
function defined in ert.el.gz.
Signature
(ert--results-test-at-point-allow-redefinition)
Documentation
Look up the test at point, and check whether it has been redefined.
To be used in the ERT results buffer.
Returns a list of two elements: the test (or nil) and a symbol specifying whether the test has been redefined.
If a new test has been defined with the same name as the test at
point, replaces the test at point with the new test, and returns
the new test and the symbol redefined.
If the test has been deleted, returns the old test and the symbol
deleted.
If the test is still current, returns the test and the symbol nil.
If there is no test at point, returns a list with two nils.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert.el.gz
(defun ert--results-test-at-point-allow-redefinition ()
"Look up the test at point, and check whether it has been redefined.
To be used in the ERT results buffer.
Returns a list of two elements: the test (or nil) and a symbol
specifying whether the test has been redefined.
If a new test has been defined with the same name as the test at
point, replaces the test at point with the new test, and returns
the new test and the symbol `redefined'.
If the test has been deleted, returns the old test and the symbol
`deleted'.
If the test is still current, returns the test and the symbol nil.
If there is no test at point, returns a list with two nils."
(let ((test (ert--results-test-at-point-no-redefinition)))
(cond ((null test)
`(nil nil))
((null (ert-test-name test))
`(,test nil))
(t
(let* ((name (ert-test-name test))
(new-test (and (ert-test-boundp name)
(ert-get-test name))))
(cond ((eql test new-test)
`(,test nil))
((null new-test)
`(,test deleted))
(t
(ert--results-update-after-test-redefinition
(ert--stats-test-pos ert--results-stats test)
new-test)
`(,new-test redefined))))))))