Function: hypb-ert-run-test-at-definition

hypb-ert-run-test-at-definition is a byte-compiled function defined in hypb-ert.el.

Signature

(hypb-ert-run-test-at-definition &optional EDEBUG-IT)

Documentation

Eval and run any Hyperbole ert test defined at point and return t.

Otherwise, return nil. Point should be on the text of the first line of an ert test def. With optional EDEBUG-IT non-nil (when the assist-key is pressed), edebug the test when it is run.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hypb-ert.el
(defun hypb-ert-run-test-at-definition (&optional edebug-it)
  "Eval and run any Hyperbole ert test defined at point and return t.
Otherwise, return nil.  Point should be on the text of the first
line of an ert test def.  With optional EDEBUG-IT non-nil (when
the assist-key is pressed), edebug the test when it is run."
  (let* ((test-name (hypb-ert-def-at-p))
	 (test-sym (intern-soft test-name)))
    (when test-name
      ;; Ensure run the latest version of the test, either with the
      ;; edebugger if `edebug-it' is non-nil; otherwise, with the
      ;; normal evaluator.
      (if edebug-it
	  (edebug-defun)
	(eval-defun nil))
      (unless test-sym
	(setq test-sym (intern-soft test-name)))
      (when (and test-sym (ert-test-boundp test-sym))
	(when (and (hypb:buffer-file-name) (string-prefix-p hyperb:dir (hypb:buffer-file-name)))
	  (hypb-ert-require-libraries))
	(when (hypb-ert test-sym)
	  t)))))