aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMattias EngdegÄrd2024-07-18 16:16:53 +0200
committerMattias EngdegÄrd2025-07-07 11:30:07 +0200
commitf2f76756211fd5a0914734c738508f522c4b2ccd (patch)
tree125db76722f9617cb67ad73f78ed3cdaf7680875 /test
parent553a6c407f28c4faa832c8cda462267ef75bff38 (diff)
downloademacs-f2f76756211fd5a0914734c738508f522c4b2ccd.tar.gz
emacs-f2f76756211fd5a0914734c738508f522c4b2ccd.zip
Print non-ASCII chars in unibyte symbols as raw bytes
Previously, latin-1 was incorrectly assumed (bug#70988). * src/print.c (print_object): Call the correct function. * test/src/print-tests.el (print-unibyte-symbols): New test.
Diffstat (limited to 'test')
-rw-r--r--test/src/print-tests.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/src/print-tests.el b/test/src/print-tests.el
index ce8c095d496..c870427a0a9 100644
--- a/test/src/print-tests.el
+++ b/test/src/print-tests.el
@@ -560,5 +560,12 @@ otherwise, use a different charset."
560 (ignore (make-string 100 ?b)))) 560 (ignore (make-string 100 ?b))))
561 (should (equal outstr "xxx")))) 561 (should (equal outstr "xxx"))))
562 562
563(ert-deftest print-unibyte-symbols ()
564 ;; Non-ASCII in unibyte symbols should print as raw bytes.
565 (should (equal (prin1-to-string (make-symbol "a\xff"))
566 (string-to-multibyte "a\xff")))
567 (should (equal (prin1-to-string (make-symbol "th\303\251"))
568 (string-to-multibyte "th\303\251"))))
569
563(provide 'print-tests) 570(provide 'print-tests)
564;;; print-tests.el ends here 571;;; print-tests.el ends here