* lisp/emacs-lisp/comp.el (comp-final): Escape multibyte string
when offloading compilation to child process.
* test/src/comp-test-funcs.el (comp-test-45342-f): New function
* test/src/comp-tests.el (bug-45342): New test
(print-quoted t)
(print-gensym t)
(print-circle t)
+ (print-escape-multibyte t)
(expr `(progn
(require 'comp)
(setf comp-verbose ,comp-verbose
(setq dir (directory-file-name (file-name-directory dir))))
(nreverse dirlist)))
+(defun comp-test-45342-f (n)
+ (pcase n
+ (1 " ➊") (2 " ➋") (3 " ➌") (4 " ➍") (5 " ➎") (6 " ➏")
+ (7 " ➐") (8 " ➑") (9 " ➒") (10 " ➓") (_ "")))
+
\f
;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests ;;
"<https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-11/msg02357.html>"
(comp-test-44968-f "/tmp/test/foo" "/tmp"))
+(comp-deftest bug-45342 ()
+ "Preserve multibyte immediate strings.
+<https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-12/msg01771.html>"
+ (should (string= " ➊" (comp-test-45342-f 1))))
+
(defvar comp-test-primitive-advice)
(comp-deftest primitive-advice ()
"Test effectiveness of primitive advicing."