Function: ert--skip-unless

ert--skip-unless is a macro defined in ert.el.gz.

Signature

(ert--skip-unless FORM)

Documentation

Evaluate FORM. If it returns nil, skip the current test.

Errors during evaluation are caught and handled like nil.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert.el.gz
(cl-defmacro ert--skip-unless (form)
  "Evaluate FORM.  If it returns nil, skip the current test.
Errors during evaluation are caught and handled like nil."
  (declare (debug t))
  (ert--expand-should `(skip-unless ,form) form
                      (lambda (inner-form form-description-form _value-var)
                        `(unless (ignore-errors ,inner-form)
                           (ert-skip ,form-description-form)))))