diff options
Diffstat (limited to '')
| -rw-r--r-- | test/src/filelock-tests.el | 6 | ||||
| -rw-r--r-- | test/src/process-tests.el | 2 |
2 files changed, 3 insertions, 5 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 | ||
diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 2cc5b37b187..55657a23fa9 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el | |||
| @@ -546,7 +546,7 @@ See Bug#30460." | |||
| 546 | ;; all `file-error' signals. | 546 | ;; all `file-error' signals. |
| 547 | (and ,message | 547 | (and ,message |
| 548 | (not (string-equal (caddr ,err) ,message)) | 548 | (not (string-equal (caddr ,err) ,message)) |
| 549 | (signal (car ,err) (cdr ,err)))))))) | 549 | (signal ,err))))))) |
| 550 | 550 | ||
| 551 | (defmacro process-tests--with-buffers (var &rest body) | 551 | (defmacro process-tests--with-buffers (var &rest body) |
| 552 | "Bind VAR to nil and evaluate BODY. | 552 | "Bind VAR to nil and evaluate BODY. |