summaryrefslogtreecommitdiff
path: root/test/lisp/legacy/coding-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/legacy/coding-tests.el')
-rw-r--r--test/lisp/legacy/coding-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/legacy/coding-tests.el b/test/lisp/legacy/coding-tests.el
index cba8c7bc25f..772c8735519 100644
--- a/test/lisp/legacy/coding-tests.el
+++ b/test/lisp/legacy/coding-tests.el
@@ -48,3 +48,11 @@
(let ((coding-system-for-write (intern "\"us-ascii\"")))
(write-region "some text" nil test-file))))
(coding-tests-remove-files)))
+
+;; See issue #5251.
+(ert-deftest ert-test-unibyte-buffer-dos-eol-decode ()
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (insert (encode-coding-string "あ" 'euc-jp) "\xd" "\n")
+ (decode-coding-region (point-min) (point-max) 'euc-jp-dos)
+ (should-not (string-match-p "\^M" (buffer-string)))))