From: Eli Zaretskii Date: Wed, 15 Feb 2023 19:00:54 +0000 (+0200) Subject: Fix mule-tests under en_US.UTF-8 locale X-Git-Tag: emacs-29.0.90~426^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2550e8bb0b03ee1c2c7a17d56c9f578bbbf1a9da;p=emacs.git Fix mule-tests under en_US.UTF-8 locale * test/lisp/international/mule-tests.el (sgml-html-meta-utf-8): Accept also utf-8-unix/dos/whatever. (Bug#61534) * lisp/international/mule.el (sgml-html-meta-auto-coding-function): Fix comparison when buffer-file-coding-system is of type 'charset'. --- diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 52019697ad7..25b90b49c8f 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2544,6 +2544,7 @@ This function is intended to be added to `auto-coding-functions'." ;; coding-system-equal, since it isn't a ;; coding-system. So test that up front. (not (equal sym-type 'charset)) + (not (equal bfcs-type 'charset)) (coding-system-equal 'utf-8 sym-type) (coding-system-equal 'utf-8 bfcs-type)) buffer-file-coding-system diff --git a/test/lisp/international/mule-tests.el b/test/lisp/international/mule-tests.el index 6e23d8c5421..6b76e35ae22 100644 --- a/test/lisp/international/mule-tests.el +++ b/test/lisp/international/mule-tests.el @@ -99,7 +99,7 @@ provide HTML fragments. Some tests override those variables." (ert-deftest sgml-html-meta-utf-8 () "Baseline: UTF-8." - (should (eq 'utf-8 (sgml-html-meta-run "utf-8")))) + (should (eq 'utf-8 (coding-system-base (sgml-html-meta-run "utf-8"))))) (ert-deftest sgml-html-meta-windows-hebrew () "A non-Unicode charset."