From: Lars Ingebrigtsen Date: Sat, 23 Apr 2022 16:14:26 +0000 (+0200) Subject: Add a failing test case for bug#12598 X-Git-Tag: emacs-29.0.90~1931^2~342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e00edf20e7d13277781712c5bbcec7b34f3a829e;p=emacs.git Add a failing test case for bug#12598 Author: --- diff --git a/test/lisp/files-resources/compile-utf8.el b/test/lisp/files-resources/compile-utf8.el new file mode 100644 index 00000000000..ea67626365d --- /dev/null +++ b/test/lisp/files-resources/compile-utf8.el @@ -0,0 +1,11 @@ +(defun zot () + "Yes." + nil) + +(defun foo () + "Yés." + nil) + +(defun bar () + "Nó." + nil) diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 34c002be271..1633f3b34cf 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1829,5 +1829,34 @@ Prompt users for any modified buffer with `buffer-offer-save' non-nil." (find-file (ert-resource-file "file-mode-prop-line")) (should (eq major-mode 'text-mode))) +(ert-deftest files-load-elc-gz-file () + :expected-result :failed + (skip-unless (executable-find "gzip")) + (ert-with-temp-directory dir + (let* ((pref (expand-file-name "compile-utf8" dir)) + (el (concat pref ".el"))) + (copy-file (ert-resource-file "compile-utf8.el") el) + (push dir load-path) + (should (load pref t)) + (should (fboundp 'foo)) + (should (documentation 'foo)) + (should (documentation 'bar)) + (should (documentation 'zot)) + + (byte-compile-file el) + (should (load (concat pref ".elc") t)) + (should (fboundp 'foo)) + (should (documentation 'foo)) + (should (documentation 'bar)) + (should (documentation 'zot)) + + (dired-compress-file (concat pref ".elc")) + (should (load (concat pref ".elc.gz") t)) + (should (fboundp 'foo)) + ;; This fails due to bug#12598. + (should (documentation 'foo)) + (should (documentation 'bar)) + (should (documentation 'zot))))) + (provide 'files-tests) ;;; files-tests.el ends here