aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/buffer-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/buffer-tests.el')
-rw-r--r--test/src/buffer-tests.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index 2adffc024a4..20f85c6c93e 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -1386,4 +1386,17 @@ with parameters from the *Messages* buffer modification."
1386 (when (buffer-live-p base) 1386 (when (buffer-live-p base)
1387 (kill-buffer base))))))) 1387 (kill-buffer base)))))))
1388 1388
1389(ert-deftest zero-length-overlays-and-not ()
1390 (with-temp-buffer
1391 (insert "hello")
1392 (let ((long-overlay (make-overlay 2 4))
1393 (zero-overlay (make-overlay 3 3)))
1394 ;; Exclude.
1395 (should (= (length (overlays-at 3)) 1))
1396 (should (eq (car (overlays-at 3)) long-overlay))
1397 ;; Include.
1398 (should (= (length (overlays-in 3 3)) 2))
1399 (should (memq long-overlay (overlays-in 3 3)))
1400 (should (memq zero-overlay (overlays-in 3 3))))))
1401
1389;;; buffer-tests.el ends here 1402;;; buffer-tests.el ends here