diff options
Diffstat (limited to 'lisp/emacs-lisp/ert.el')
-rw-r--r-- | lisp/emacs-lisp/ert.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 68762b0752c..47d20cb69e8 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -516,6 +516,11 @@ Returns nil if they are." (cl-assert (equal a b) t) nil)))))))) ((pred arrayp) + ;; For mixed unibyte/multibyte string comparisons, make both multibyte. + (when (and (stringp a) + (xor (multibyte-string-p a) (multibyte-string-p b))) + (setq a (string-to-multibyte a)) + (setq b (string-to-multibyte b))) (if (/= (length a) (length b)) `(arrays-of-different-length ,(length a) ,(length b) ,a ,b |