summaryrefslogtreecommitdiff
path: root/test/src/buffer-tests.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2018-10-14 16:44:21 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2018-10-14 16:44:21 -0400
commit8c68e4afa8eebb6f738fdce600a6815509ac50a3 (patch)
tree36bfa55ae5bcf1f36a7c5754ca1a4729cace4c1d /test/src/buffer-tests.el
parentf1ea2b9e6b63593f5919f60a68a9e19026756ac4 (diff)
downloademacs-8c68e4afa8eebb6f738fdce600a6815509ac50a3.tar.gz
* src/buffer.c (Fmove_overlay): Don't call Fdelete_overlay
... because the data structure is not in a consistent state. * test/src/buffer-tests.el (overlay-evaporation-after-killed-buffer): New test.
Diffstat (limited to 'test/src/buffer-tests.el')
-rw-r--r--test/src/buffer-tests.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index 0e4fd3655ae..609585f43ed 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -79,4 +79,19 @@ with parameters from the *Messages* buffer modification."
(with-temp-buffer
(should (eq (buffer-base-buffer (current-buffer)) nil))))
+(ert-deftest overlay-evaporation-after-killed-buffer ()
+ (let* ((ols (with-temp-buffer
+ (insert "toto")
+ (list
+ (make-overlay (point-min) (point-max))
+ (make-overlay (point-min) (point-max))
+ (make-overlay (point-min) (point-max)))))
+ (ol (nth 1 ols)))
+ (overlay-put ol 'evaporate t)
+ ;; Evaporation within move-overlay of an overlay that was deleted because
+ ;; of a kill-buffer, triggered an assertion failure in unchain_both.
+ (with-temp-buffer
+ (insert "toto")
+ (move-overlay ol (point-min) (point-min)))))
+
;;; buffer-tests.el ends here