Function: ert-font-lock-test-string

ert-font-lock-test-string is an autoloaded and byte-compiled function defined in ert-font-lock.el.gz.

Signature

(ert-font-lock-test-string TEST-STRING MODE)

Documentation

Check font faces in TEST-STRING set by MODE.

The function is meant to be run from within an ERT test.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert-font-lock.el.gz
;;;###autoload
(defun ert-font-lock-test-string (test-string mode)
  "Check font faces in TEST-STRING set by MODE.

The function is meant to be run from within an ERT test."
  (ert-font-lock--validate-major-mode mode)
  (with-temp-buffer
    (insert test-string)
    (funcall mode)
    (font-lock-ensure)

    (ert-font-lock--check-faces (ert-font-lock--parse-comments)))

  (ert-pass))