aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-03-14 10:27:12 +0100
committerLars Ingebrigtsen2022-03-14 10:29:54 +0100
commit637dde4aba921435f78d0de769ad74c4f3230aa6 (patch)
treef6057e5d04746c63a74ab925108432fe7df52d42 /test/src
parent15c61cb359bc0021f14fbcc5a2e0eb71fe0261ab (diff)
downloademacs-637dde4aba921435f78d0de769ad74c4f3230aa6.tar.gz
emacs-637dde4aba921435f78d0de769ad74c4f3230aa6.zip
Don't always escape "." and "?" in `prin1'
* src/print.c (print_object): Only escape "." and "?" when appearing as the first character in a symbol (bug#23130).
Diffstat (limited to 'test/src')
-rw-r--r--test/src/print-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/print-tests.el b/test/src/print-tests.el
index 1ef0caf1a46..0bae1959d1b 100644
--- a/test/src/print-tests.el
+++ b/test/src/print-tests.el
@@ -417,5 +417,13 @@ otherwise, use a different charset."
417 t))) 417 t)))
418 (should (equal (prin1-to-string (make-marker)) "")))) 418 (should (equal (prin1-to-string (make-marker)) ""))))
419 419
420(ert-deftest test-dots ()
421 (should (equal (prin1-to-string 'foo.bar) "foo.bar"))
422 (should (equal (prin1-to-string '.foo) "\\.foo"))
423 (should (equal (prin1-to-string '.foo.) "\\.foo."))
424 (should (equal (prin1-to-string 'bar?bar) "bar?bar"))
425 (should (equal (prin1-to-string '\?bar) "\\?bar"))
426 (should (equal (prin1-to-string '\?bar?) "\\?bar?")))
427
420(provide 'print-tests) 428(provide 'print-tests)
421;;; print-tests.el ends here 429;;; print-tests.el ends here