diff options
Diffstat (limited to 'test/automated/simple-test.el')
-rw-r--r-- | test/automated/simple-test.el | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/automated/simple-test.el b/test/automated/simple-test.el index 40cd1d2949..c41d01075e 100644 --- a/test/automated/simple-test.el +++ b/test/automated/simple-test.el @@ -311,6 +311,7 @@ (undo-test-point-after-forward-kill)))) (defmacro simple-test-undo-with-switched-buffer (buffer &rest body) + (declare (indent 1) (debug t)) (let ((before-buffer (make-symbol "before-buffer"))) `(let ((,before-buffer (current-buffer))) (unwind-protect @@ -340,8 +341,24 @@ C-/ ;; undo (point-min) (point-max)))))) +(ert-deftest missing-record-point-in-undo () + "Check point is being restored correctly. - +See Bug#21722." + (should + (= 5 + (with-temp-buffer + (generate-new-buffer " *temp*") + (emacs-lisp-mode) + (setq buffer-undo-list nil) + (insert "(progn (end-of-line) (insert \"hello\"))") + (beginning-of-line) + (forward-char 4) + (undo-boundary) + (eval-defun nil) + (undo-boundary) + (undo) + (point))))) (provide 'simple-test) ;;; simple-test.el ends here |