Fix simple-tests--undo*

* test/lisp/simple-tests.el (simple-tests--undo-in-region,
simple-tests--undo-equiv-table): Re-enable in batch mode.
Enable 'transient-mark-mode' in temp buffer.
This commit is contained in:
Yuan Fu 2021-03-12 12:18:22 -05:00 committed by Stefan Monnier
parent 6d024ae867
commit 75705b302d

View file

@ -469,8 +469,11 @@ See bug#35036."
(ert-deftest simple-tests--undo-in-region ()
;; Test undo/redo in region.
(skip-unless (not noninteractive))
(with-temp-buffer
;; Enable `transient-mark-mode' so `region-active-p' works as
;; expected. `region-active-p' is used to determine whether to
;; perform regional undo in `undo'.
(transient-mark-mode)
(buffer-enable-undo)
(dolist (x '("a" "b" "c" "d" "e"))
(insert x)
@ -506,9 +509,9 @@ See bug#35036."
lst)
(ert-deftest simple-tests--undo-equiv-table ()
(skip-unless (not noninteractive))
(with-temp-buffer
(buffer-enable-undo)
(transient-mark-mode)
(let ((ul-hash-table (make-hash-table :test #'equal)))
(dolist (x '("a" "b" "c"))
(insert x)