From 84a06b500fd1cb500e89b93d3f5746b60c6ffdd4 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 3 Feb 2013 23:46:22 -0800 Subject: [PATCH] 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 --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/ert.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b676835bfef..b43b7bc61d1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-02-04 Glenn Morris + + * emacs-lisp/ert.el (ert--explain-format-atom): + Don't try to print non-characters as characters. (Bug#13543) + 2013-02-03 Michael Albinus * net/tramp.el (tramp-debug-message): Extend function exclude list. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index dd849362228..7df3acccbc9 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -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) -- 2.39.5