diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/electric-tests.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el index 56d1bdb110e..67f474cbd52 100644 --- a/test/lisp/electric-tests.el +++ b/test/lisp/electric-tests.el | |||
| @@ -547,6 +547,24 @@ baz\"\"" | |||
| 547 | (should (equal "" (buffer-string)))))) | 547 | (should (equal "" (buffer-string)))))) |
| 548 | 548 | ||
| 549 | 549 | ||
| 550 | ;;; Undoing | ||
| 551 | (ert-deftest electric-pair-undo-unrelated-state () | ||
| 552 | "Make sure `electric-pair-mode' does not confuse `undo' (bug#39680)." | ||
| 553 | (with-temp-buffer | ||
| 554 | (buffer-enable-undo) | ||
| 555 | (electric-pair-local-mode) | ||
| 556 | (let ((last-command-event ?\()) | ||
| 557 | (ert-simulate-command '(self-insert-command 1))) | ||
| 558 | (undo-boundary) | ||
| 559 | (let ((last-command-event ?a)) | ||
| 560 | (ert-simulate-command '(self-insert-command 1))) | ||
| 561 | (undo-boundary) | ||
| 562 | (ert-simulate-command '(undo)) | ||
| 563 | (let ((last-command-event ?\()) | ||
| 564 | (ert-simulate-command '(self-insert-command 1))) | ||
| 565 | (should (string= (buffer-string) "(())")))) | ||
| 566 | |||
| 567 | |||
| 550 | ;;; Electric newlines between pairs | 568 | ;;; Electric newlines between pairs |
| 551 | ;;; TODO: better tests | 569 | ;;; TODO: better tests |
| 552 | (ert-deftest electric-pair-open-extra-newline () | 570 | (ert-deftest electric-pair-open-extra-newline () |