diff options
Diffstat (limited to 'test/src/buffer-tests.el')
| -rw-r--r-- | test/src/buffer-tests.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index e0207325241..b96a8dcacd2 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el | |||
| @@ -275,6 +275,27 @@ with parameters from the *Messages* buffer modification." | |||
| 275 | (with-temp-buffer | 275 | (with-temp-buffer |
| 276 | (should (eq (buffer-base-buffer (current-buffer)) nil)))) | 276 | (should (eq (buffer-base-buffer (current-buffer)) nil)))) |
| 277 | 277 | ||
| 278 | (ert-deftest buffer-tests--overlays-indirect-bug58928 () | ||
| 279 | (with-temp-buffer | ||
| 280 | (insert "hello world") | ||
| 281 | (let* ((base (current-buffer)) | ||
| 282 | (ol1 (make-overlay (+ 2 (point-min)) (+ 8 (point-min)))) | ||
| 283 | (ib (make-indirect-buffer | ||
| 284 | base (generate-new-buffer-name "bug58928"))) | ||
| 285 | (ol2 (with-current-buffer ib | ||
| 286 | (make-overlay (+ 2 (point-min)) (+ 8 (point-min)))))) | ||
| 287 | (should (equal (overlay-start ol1) (overlay-start ol2))) | ||
| 288 | (should (equal (overlay-end ol1) (overlay-end ol2))) | ||
| 289 | (goto-char (+ 3 (point-min))) | ||
| 290 | (insert "a") (delete-char 2) | ||
| 291 | (should (equal (overlay-start ol1) (overlay-start ol2))) | ||
| 292 | (should (equal (overlay-end ol1) (overlay-end ol2))) | ||
| 293 | (with-current-buffer ib | ||
| 294 | (goto-char (+ 4 (point-min))) | ||
| 295 | (insert "a") (delete-char 2)) | ||
| 296 | (should (equal (overlay-start ol1) (overlay-start ol2))) | ||
| 297 | (should (equal (overlay-end ol1) (overlay-end ol2)))))) | ||
| 298 | |||
| 278 | (ert-deftest overlay-evaporation-after-killed-buffer () | 299 | (ert-deftest overlay-evaporation-after-killed-buffer () |
| 279 | (let* ((ols (with-temp-buffer | 300 | (let* ((ols (with-temp-buffer |
| 280 | (insert "toto") | 301 | (insert "toto") |