diff options
| author | Gerd Möllmann | 2025-02-07 11:27:06 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2025-02-07 11:27:06 +0100 |
| commit | 92aecdfd9fda59f3ea66c5709f0bc7af882a0c0d (patch) | |
| tree | 7c35f431d6bcae939ebbb07b008b6be3c6d95d53 /test/lisp/files-tests.el | |
| parent | f6e6585f5751852dbdc972fef8fc5a3ccc6e4573 (diff) | |
| download | emacs-92aecdfd9fda59f3ea66c5709f0bc7af882a0c0d.tar.gz emacs-92aecdfd9fda59f3ea66c5709f0bc7af882a0c0d.zip | |
; Fix files-tests
* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Override symbol function of read-key instead of read-event.
Diffstat (limited to 'test/lisp/files-tests.el')
| -rw-r--r-- | test/lisp/files-tests.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index e085d052e1c..5e2c4eb2669 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el | |||
| @@ -1973,7 +1973,7 @@ FN-TEST is the function to test: either `save-some-buffers' or | |||
| 1973 | `save-some-buffers-default-predicate' let-bound to a value | 1973 | `save-some-buffers-default-predicate' let-bound to a value |
| 1974 | specified inside ARGS-RESULTS. | 1974 | specified inside ARGS-RESULTS. |
| 1975 | 1975 | ||
| 1976 | During the call to FN-TEST,`read-event' is overridden with a function that | 1976 | During the call to FN-TEST,`read-key' is overridden with a function that |
| 1977 | just returns `n' and `kill-emacs' is overridden to do nothing. | 1977 | just returns `n' and `kill-emacs' is overridden to do nothing. |
| 1978 | 1978 | ||
| 1979 | ARGS-RESULTS is a list of elements (FN-ARGS CALLERS-DIR EXPECTED), where | 1979 | ARGS-RESULTS is a list of elements (FN-ARGS CALLERS-DIR EXPECTED), where |
| @@ -2004,7 +2004,7 @@ CALLERS-DIR specifies the value to let-bind | |||
| 2004 | (setq nb-saved-buffers 0) | 2004 | (setq nb-saved-buffers 0) |
| 2005 | (with-current-buffer (car buffers) | 2005 | (with-current-buffer (car buffers) |
| 2006 | (cl-letf | 2006 | (cl-letf |
| 2007 | (((symbol-function 'read-event) | 2007 | (((symbol-function 'read-key) |
| 2008 | ;; Increase counter and answer 'n' when prompted | 2008 | ;; Increase counter and answer 'n' when prompted |
| 2009 | ;; to save a buffer. | 2009 | ;; to save a buffer. |
| 2010 | (lambda (&rest _) (cl-incf nb-saved-buffers) ?n)) | 2010 | (lambda (&rest _) (cl-incf nb-saved-buffers) ?n)) |