diff options
Diffstat (limited to 'test/src/buffer-tests.el')
-rw-r--r-- | test/src/buffer-tests.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index 43b7ea75d50..845d41f9d60 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el @@ -69,4 +69,29 @@ with parameters from the *Messages* buffer modification." (progn (get-buffer-create "nil") (generate-new-buffer-name "nil"))))) +(ert-deftest test-buffer-base-buffer-indirect () + (with-temp-buffer + (let* ((ind-buf-name (generate-new-buffer-name "indbuf")) + (ind-buf (make-indirect-buffer (current-buffer) ind-buf-name))) + (should (eq (buffer-base-buffer ind-buf) (current-buffer)))))) + +(ert-deftest test-buffer-base-buffer-non-indirect () + (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 |