summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-04-22 10:58:13 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-04-22 11:00:16 -0700
commit7128b0de899111c97749e3b7cddfb2935a7f0a9a (patch)
tree19f5ce0fa1e88999f165123149acd58d1a35ef97 /test
parentdf61b078228d8ee62abc9b03ae357a867c1013b3 (diff)
downloademacs-7128b0de899111c97749e3b7cddfb2935a7f0a9a.tar.gz
Omit needless "\ " after multibyte then newline
* src/print.c: Include <c-ctype.h>, for c_isxdigit. (print_object): When print-escape-multibyte is non-nil and a multibyte character is followed by a newline or formfeed, followed by a hex digit, don't output a needless "\ " before the hex digit. * test/automated/print-tests.el (print-hex-backslash): New test.
Diffstat (limited to 'test')
-rw-r--r--test/automated/print-tests.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/automated/print-tests.el b/test/automated/print-tests.el
index 2761109d2d5..fe8c56553a8 100644
--- a/test/automated/print-tests.el
+++ b/test/automated/print-tests.el
@@ -21,6 +21,12 @@
(require 'ert)
+(ert-deftest print-hex-backslash ()
+ (should (string= (let ((print-escape-multibyte t)
+ (print-escape-newlines t))
+ (prin1-to-string "\u00A2\ff"))
+ "\"\\x00a2\\ff\"")))
+
(ert-deftest terpri ()
(should (string= (with-output-to-string
(princ 'abc)