diff options
| author | Stefan Monnier | 2026-03-09 10:34:05 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2026-03-09 10:34:05 -0400 |
| commit | 0487d68ab9992be4fa70cfd908909001f71e66af (patch) | |
| tree | 8c93da3b94717d184f88277e277de949ecb2fb9c /test/src/filelock-tests.el | |
| parent | 798dceb467d4ead092979822f24090c8378f8320 (diff) | |
| download | emacs-scratch/error-API.tar.gz emacs-scratch/error-API.zip | |
Diffstat (limited to 'test/src/filelock-tests.el')
| -rw-r--r-- | test/src/filelock-tests.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/src/filelock-tests.el b/test/src/filelock-tests.el index 795039cd9cb..1a4497c5377 100644 --- a/test/src/filelock-tests.el +++ b/test/src/filelock-tests.el | |||
| @@ -137,8 +137,7 @@ the case)." | |||
| 137 | 137 | ||
| 138 | ;; Errors from `unlock-buffer' should call | 138 | ;; Errors from `unlock-buffer' should call |
| 139 | ;; `userlock--handle-unlock-error' (bug#46397). | 139 | ;; `userlock--handle-unlock-error' (bug#46397). |
| 140 | (cl-letf (((symbol-function 'userlock--handle-unlock-error) | 140 | (cl-letf (((symbol-function 'userlock--handle-unlock-error) #'signal)) |
| 141 | (lambda (err) (signal (car err) (cdr err))))) | ||
| 142 | (should (equal '(file-error "Unlocking file") | 141 | (should (equal '(file-error "Unlocking file") |
| 143 | (seq-subseq (should-error (unlock-buffer)) 0 2)))))) | 142 | (seq-subseq (should-error (unlock-buffer)) 0 2)))))) |
| 144 | 143 | ||
| @@ -160,8 +159,7 @@ the case)." | |||
| 160 | ;; File errors from unlocking files should call | 159 | ;; File errors from unlocking files should call |
| 161 | ;; `userlock--handle-unlock-error' (bug#46397). | 160 | ;; `userlock--handle-unlock-error' (bug#46397). |
| 162 | (cl-letf (((symbol-function 'yes-or-no-p) #'always) | 161 | (cl-letf (((symbol-function 'yes-or-no-p) #'always) |
| 163 | ((symbol-function 'userlock--handle-unlock-error) | 162 | ((symbol-function 'userlock--handle-unlock-error) #'signal err)) |
| 164 | (lambda (err) (signal (car err) (cdr err))))) | ||
| 165 | (should (equal '(file-error "Unlocking file") | 163 | (should (equal '(file-error "Unlocking file") |
| 166 | (seq-subseq (should-error (kill-buffer)) 0 2)))))) | 164 | (seq-subseq (should-error (kill-buffer)) 0 2)))))) |
| 167 | 165 | ||