Function: faceup-test-font-lock-buffer

faceup-test-font-lock-buffer is a byte-compiled function defined in faceup.el.gz.

Signature

(faceup-test-font-lock-buffer MODE FACEUP &optional BUFFER)

Documentation

Verify that BUFFER is fontified as FACEUP for major mode MODE.

If BUFFER is not specified the current buffer is used.

Note that the major mode of the buffer is set to MODE and that the buffer is fontified.

If MODE is a list, the first element is the major mode, the remaining are additional functions to call, e.g. minor modes.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/faceup.el.gz
;; ------------------------------
;; Font-lock regression test support.
;;

(defun faceup-test-font-lock-buffer (mode faceup &optional buffer)
  "Verify that BUFFER is fontified as FACEUP for major mode MODE.

If BUFFER is not specified the current buffer is used.

Note that the major mode of the buffer is set to MODE and that
the buffer is fontified.

If MODE is a list, the first element is the major mode, the
remaining are additional functions to call, e.g. minor modes."
  (save-excursion
    (if buffer
        (set-buffer buffer))
    (if (listp mode)
        (dolist (m mode)
          (funcall m))
      (funcall mode))
    (font-lock-fontify-region (point-min) (point-max))
    (let ((result (faceup-markup-buffer)))
      (faceup-test-equal faceup result))))