From: Andreas Politz Date: Thu, 5 Oct 2017 17:24:55 +0000 (+0200) Subject: Add test regarding overlay and buffer encoding X-Git-Tag: emacs-29.0.90~1616^2~406^2~69 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7c0824a1d04d660c86c78143d5485af174ee0c6b;p=emacs.git Add test regarding overlay and buffer encoding * test/src/buffer-tests.el (test-overlay-multibyte-transition-1): New test exposing a bug regarding overlays when changing the multibyteness of a buffer. --- diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index 71f8705c6fd..e3bc2c5dfcb 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el @@ -1212,6 +1212,14 @@ with parameters from the *Messages* buffer modification." (54 . 135) (68 . 99)))))) +(ert-deftest test-overlay-multibyte-transition-1 () + (with-temp-buffer + (set-buffer-multibyte t) + (insert "Ä") + (let ((ov (make-overlay (point-min) (point-max)))) + (set-buffer-multibyte nil) + (should (eq (overlay-end ov) (point-max)))))) + ;; +===================================================================================+ ;; | Autogenerated insert/delete/narrow tests