summaryrefslogtreecommitdiff
path: root/test/lisp/legacy/coding-tests.el
diff options
context:
space:
mode:
authorAndrew Hyatt <ahyatt@gmail.com>2016-05-21 00:08:27 -0400
committerAndrew Hyatt <ahyatt@gmail.com>2016-05-21 00:13:43 -0400
commit44d743c20fa84fe041581dd3e0e2c5b9d86189e7 (patch)
treeb8e1d26ec8d51ed6992d3d374d28214c5b8e863b /test/lisp/legacy/coding-tests.el
parentf2b7a432687d6d561162774b8f3dc558903c796f (diff)
downloademacs-44d743c20fa84fe041581dd3e0e2c5b9d86189e7.tar.gz
emacs-44d743c20fa84fe041581dd3e0e2c5b9d86189e7.tar.bz2
emacs-44d743c20fa84fe041581dd3e0e2c5b9d86189e7.zip
Added tests for dos unibyte decoding.
The underlying bug was previously fixed by Eli Zaretskii in commit c8109d9c4057d8cac79e2c139758cadd410e7446.
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)))))