Function: ert-with-test-buffer-selected

ert-with-test-buffer-selected is a macro defined in ert-x.el.gz.

Signature

(ert-with-test-buffer-selected (&key NAME) &body BODY)

Documentation

Create a test buffer, switch to it, and run BODY.

This combines ert-with-test-buffer and ert-with-buffer-selected. The return value is the last form in BODY.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert-x.el.gz
(cl-defmacro ert-with-test-buffer-selected ((&key name) &body body)
  "Create a test buffer, switch to it, and run BODY.

This combines `ert-with-test-buffer' and
`ert-with-buffer-selected'.  The return value is the last form in
BODY."
  (declare (debug ((":name" form) body)) (indent 1))
  `(ert-with-test-buffer (:name ,name)
     (ert-with-buffer-selected (current-buffer)
       ,@body)))