ert--explain-format-atom fix for non-characters

* lisp/emacs-lisp/ert.el (ert--explain-format-atom):
Don't try to print non-characters as characters.

Fixes: debbugs:13543
This commit is contained in:
Glenn Morris 2013-02-03 23:46:22 -08:00
parent 69d52b98fc
commit 84a06b500f
2 changed files with 7 additions and 1 deletions

View file

@ -568,7 +568,8 @@ failed."
(defun ert--explain-format-atom (x)
"Format the atom X for `ert--explain-equal'."
(cl-typecase x
(fixnum (list x (format "#x%x" x) (format "?%c" x)))
(character (list x (format "#x%x" x) (format "?%c" x)))
(fixnum (list x (format "#x%x" x)))
(t x)))
(defun ert--explain-equal-rec (a b)