aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/editfns-tests.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index 3da9d4e8acd..2553ad3ec2c 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -357,6 +357,20 @@
357 (should (= m7a (+ (point-min) 7))))) 357 (should (= m7a (+ (point-min) 7)))))
358 (widen))))) 358 (widen)))))
359 359
360(ert-deftest editfns-tests--insert-via-replace ()
361 (with-temp-buffer
362 (insert "bar")
363 (goto-char (point-min))
364 ;; Check that markers insertion type is respected when an insertion
365 ;; happens via a "replace" operation.
366 (let ((m1 (copy-marker (point) nil))
367 (m2 (copy-marker (point) t)))
368 (looking-at "\\(\\)")
369 (replace-match "foo")
370 (should (equal "foobar" (buffer-string)))
371 (should (= (point-min) m1))
372 (should (= (+ (point-min) 3) m2)))))
373
360(ert-deftest delete-region-undo-markers-1 () 374(ert-deftest delete-region-undo-markers-1 ()
361 "Make sure we don't end up with freed markers reachable from Lisp." 375 "Make sure we don't end up with freed markers reachable from Lisp."
362 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30931#40 376 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30931#40