Function: ert--print-test-for-ewoc
ert--print-test-for-ewoc is a byte-compiled function defined in
ert.el.gz.
Signature
(ert--print-test-for-ewoc ENTRY)
Documentation
The ewoc print function for ewoc test entries. ENTRY is the entry to print.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert.el.gz
(defun ert--print-test-for-ewoc (entry)
"The ewoc print function for ewoc test entries. ENTRY is the entry to print."
(let* ((test (ert--ewoc-entry-test entry))
(stats ert--results-stats)
(result (let ((pos (ert--stats-test-pos stats test)))
(cl-assert pos)
(aref (ert--stats-test-results stats) pos)))
(hiddenp (ert--ewoc-entry-hidden-p entry))
(expandedp (ert--ewoc-entry-expanded-p entry))
(extended-printer-limits-p (ert--ewoc-entry-extended-printer-limits-p
entry)))
(cond (hiddenp)
(t
(let ((expectedp (ert-test-result-expected-p test result)))
(insert-text-button (format "%c" (ert-char-for-test-result
result expectedp))
:type 'ert--results-expand-collapse-button
'face (or (and font-lock-mode
(ert-face-for-test-result
expectedp))
'button)))
(insert " ")
(ert-insert-test-name-button (ert-test-name test))
(insert "\n")
(when (and expandedp (not (eql result 'nil)))
(when (ert-test-documentation test)
(insert " "
(propertize
(ert--string-first-line
(substitute-command-keys
(ert-test-documentation test)))
'font-lock-face 'font-lock-doc-face)
"\n"))
(cl-etypecase result
(ert-test-passed
(if (ert-test-result-expected-p test result)
(insert " passed\n")
(insert " passed unexpectedly\n"))
(insert ""))
(ert-test-result-with-condition
(ert--insert-infos result)
(let ((print-escape-newlines t)
(print-level (if extended-printer-limits-p 12 6))
(print-length (if extended-printer-limits-p 100 10)))
(insert " ")
(let ((begin (point)))
(ert--pp-with-indentation-and-newline
(ert-test-result-with-condition-condition result))
(ert--make-xrefs-region begin (point)))))
(ert-test-aborted-with-non-local-exit
(insert " aborted\n"))
(ert-test-quit
(insert " quit\n")))
(insert "\n")))))
nil)