diff options
| author | Paul Eggert | 2016-06-19 00:47:00 +0200 |
|---|---|---|
| committer | Paul Eggert | 2016-06-19 00:47:00 +0200 |
| commit | 68cb71c0928eb8b10487a125192f43923e8bfe7f (patch) | |
| tree | 053133358af1bd991d60ed6c29590ad84b29fed0 /test | |
| parent | 87c9d8fcec183c8f4933e218c1895b6a0722b1e1 (diff) | |
| parent | 9ae514a9b7ed368ea97ddefa806079b6423833cb (diff) | |
| download | emacs-68cb71c0928eb8b10487a125192f43923e8bfe7f.tar.gz emacs-68cb71c0928eb8b10487a125192f43923e8bfe7f.zip | |
Merge from origin/emacs-25
9ae514a * etc/AUTHORS: Update the AUTHORS file
3ca428e add entries to authors.el
66d556b Fix eldoc-related freezes in python mode
d59bcbc Handle mouse leaving initial window in `mouse-set-region' (Bu...
27fe1e4 org.el: Fix bindings of < and > for calendar scrolling
a813487 Fix undo boundary in recursive edit (Bug#23632)
1f85b7c Doc fixes re alist-get. (Bug#23548)
ba3f206 * lisp/progmodes/python.el (inferior-python-mode): Avoid tabs...
56fa055 * src/syntax.c (syms_of_syntax) <comment-end-can-be-escaped>:...
4c1370a * lisp/help-fns.el (describe-function-1): Fix handling of fil...
a3f7ae8 * lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix re "by".
601b9b2 * doc/misc/cl.texi (Mapping over Sequences): Fix cl-notevery.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/simple-tests.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 12ebc75ea92..40cd1d29498 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el | |||
| @@ -310,6 +310,38 @@ | |||
| 310 | (= 6 | 310 | (= 6 |
| 311 | (undo-test-point-after-forward-kill)))) | 311 | (undo-test-point-after-forward-kill)))) |
| 312 | 312 | ||
| 313 | (defmacro simple-test-undo-with-switched-buffer (buffer &rest body) | ||
| 314 | (let ((before-buffer (make-symbol "before-buffer"))) | ||
| 315 | `(let ((,before-buffer (current-buffer))) | ||
| 316 | (unwind-protect | ||
| 317 | (progn | ||
| 318 | (switch-to-buffer ,buffer) | ||
| 319 | ,@body) | ||
| 320 | (switch-to-buffer ,before-buffer))))) | ||
| 321 | |||
| 322 | ;; This tests for a regression in emacs 25.0 see bug #23632 | ||
| 323 | (ert-deftest simple-test-undo-extra-boundary-in-tex () | ||
| 324 | (should | ||
| 325 | (string= | ||
| 326 | "" | ||
| 327 | (simple-test-undo-with-switched-buffer | ||
| 328 | "temp.tex" | ||
| 329 | (latex-mode) | ||
| 330 | ;; This macro calls `latex-insert-block' | ||
| 331 | (execute-kbd-macro | ||
| 332 | (read-kbd-macro | ||
| 333 | " | ||
| 334 | C-c C-o ;; latex-insert-block | ||
| 335 | RET ;; newline | ||
| 336 | C-/ ;; undo | ||
| 337 | " | ||
| 338 | )) | ||
| 339 | (buffer-substring-no-properties | ||
| 340 | (point-min) | ||
| 341 | (point-max)))))) | ||
| 342 | |||
| 343 | |||
| 344 | |||
| 313 | 345 | ||
| 314 | (provide 'simple-test) | 346 | (provide 'simple-test) |
| 315 | ;;; simple-test.el ends here | 347 | ;;; simple-test.el ends here |