From 7c0824a1d04d660c86c78143d5485af174ee0c6b Mon Sep 17 00:00:00 2001 From: Andreas Politz Date: Thu, 5 Oct 2017 19:24:55 +0200 Subject: [PATCH] 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. --- test/src/buffer-tests.el | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.39.2