aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorStefan Monnier2026-03-09 10:34:05 -0400
committerStefan Monnier2026-03-09 10:34:05 -0400
commit0487d68ab9992be4fa70cfd908909001f71e66af (patch)
tree8c93da3b94717d184f88277e277de949ecb2fb9c /test/lisp
parent798dceb467d4ead092979822f24090c8378f8320 (diff)
downloademacs-scratch/error-API.tar.gz
emacs-scratch/error-API.zip
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/arc-mode-tests.el5
-rw-r--r--test/lisp/autorevert-tests.el2
-rw-r--r--test/lisp/emacs-lisp/edebug-tests.el5
-rw-r--r--test/lisp/emacs-lisp/pp-tests.el2
-rw-r--r--test/lisp/net/tramp-tests.el4
-rw-r--r--test/lisp/proced-tests.el2
-rw-r--r--test/lisp/vc/vc-git-tests.el2
-rw-r--r--test/lisp/vc/vc-tests/vc-tests.el3
8 files changed, 12 insertions, 13 deletions
diff --git a/test/lisp/arc-mode-tests.el b/test/lisp/arc-mode-tests.el
index 43a441918a5..235a67c8649 100644
--- a/test/lisp/arc-mode-tests.el
+++ b/test/lisp/arc-mode-tests.el
@@ -113,9 +113,10 @@ member MEMBER. Then the test finds ARCHIVE and ensures that function
113 ;; turn the most likely error into a nice 113 ;; turn the most likely error into a nice
114 ;; and self-explaining symbol that can be 114 ;; and self-explaining symbol that can be
115 ;; compared in a `should' 115 ;; compared in a `should'
116 (if (string= (cadr err) "Buffer format not recognized") 116 (if (equal (error-slot-value err 1)
117 "Buffer format not recognized")
117 'signature-not-recognized 118 'signature-not-recognized
118 (signal (car err) (cdr err)))))) 119 (signal err)))))
119 (should (eq type (quote ,type))))) 120 (should (eq type (quote ,type)))))
120 (when buffer (kill-buffer buffer)) 121 (when buffer (kill-buffer buffer))
121 (dolist (file (list member archive)) 122 (dolist (file (list member archive))
diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el
index 8a0ce146fbb..a43a45fa0ee 100644
--- a/test/lisp/autorevert-tests.el
+++ b/test/lisp/autorevert-tests.el
@@ -203,7 +203,7 @@ It is checked for buffer-local `auto-revert-notify-watch-descriptor'."
203 (tramp-dissect-file-name auto-revert--test-rootdir) t 'keep-password) 203 (tramp-dissect-file-name auto-revert--test-rootdir) t 'keep-password)
204 (condition-case err 204 (condition-case err
205 (funcall (ert-test-body ert-test)) 205 (funcall (ert-test-body ert-test))
206 (error (message "%s" err) (signal (car err) (cdr err))))))) 206 (error (message "%s" err) (signal err))))))
207 207
208(defmacro with-auto-revert-test (&rest body) 208(defmacro with-auto-revert-test (&rest body)
209 (declare (debug t)) 209 (declare (debug t))
diff --git a/test/lisp/emacs-lisp/edebug-tests.el b/test/lisp/emacs-lisp/edebug-tests.el
index c93dfad0a0d..61e909437c7 100644
--- a/test/lisp/emacs-lisp/edebug-tests.el
+++ b/test/lisp/emacs-lisp/edebug-tests.el
@@ -120,8 +120,7 @@ back to the top level.")
120 (eval-buffer) 120 (eval-buffer)
121 ,@body 121 ,@body
122 (when edebug-tests-failure-in-post-command 122 (when edebug-tests-failure-in-post-command
123 (signal (car edebug-tests-failure-in-post-command) 123 (signal edebug-tests-failure-in-post-command)))
124 (cdr edebug-tests-failure-in-post-command))))
125 (unload-feature 'edebug-test-code) 124 (unload-feature 'edebug-test-code)
126 (with-current-buffer (find-file-noselect edebug-tests-temp-file) 125 (with-current-buffer (find-file-noselect edebug-tests-temp-file)
127 (set-buffer-modified-p nil)) 126 (set-buffer-modified-p nil))
@@ -246,7 +245,7 @@ keyboard macro."
246 (funcall thunk) 245 (funcall thunk)
247 (error 246 (error
248 (setq edebug-tests-failure-in-post-command err) 247 (setq edebug-tests-failure-in-post-command err)
249 (signal (car err) (cdr err))))) 248 (signal err))))
250 (setq edebug-tests-kbd-macro-index executing-kbd-macro-index)))) 249 (setq edebug-tests-kbd-macro-index executing-kbd-macro-index))))
251 250
252(defvar edebug-tests-func nil 251(defvar edebug-tests-func nil
diff --git a/test/lisp/emacs-lisp/pp-tests.el b/test/lisp/emacs-lisp/pp-tests.el
index ed4c9fcf978..c4e93e16005 100644
--- a/test/lisp/emacs-lisp/pp-tests.el
+++ b/test/lisp/emacs-lisp/pp-tests.el
@@ -82,7 +82,7 @@
82 (invalid-read-syntax 82 (invalid-read-syntax
83 (message "Invalid fill result with i=%d:\n%s" 83 (message "Invalid fill result with i=%d:\n%s"
84 i (buffer-string)) 84 i (buffer-string))
85 (signal (car err) (cdr err)) 85 (signal err)
86 )))))))) 86 ))))))))
87 87
88(ert-deftest pp-tests--bug76715 () 88(ert-deftest pp-tests--bug76715 ()
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 28d773ca616..265821ed439 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -192,7 +192,7 @@ The temporary file is not created."
192 (: "Making symbolic link" 192 (: "Making symbolic link"
193 (? ":") " Operation not permitted"))) 193 (? ":") " Operation not permitted")))
194 (error-message-string err)) 194 (error-message-string err))
195 (signal (car err) (cdr err)))))) 195 (signal err)))))
196 196
197;; Don't print messages in nested `tramp--test-instrument-test-case' calls. 197;; Don't print messages in nested `tramp--test-instrument-test-case' calls.
198(defvar tramp--test-instrument-test-case-p nil 198(defvar tramp--test-instrument-test-case-p nil
@@ -4290,7 +4290,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
4290 (file-error 4290 (file-error
4291 (unless (string-prefix-p "error with add-name-to-file" 4291 (unless (string-prefix-p "error with add-name-to-file"
4292 (error-message-string err)) 4292 (error-message-string err))
4293 (signal (car err) (cdr err)))))) 4293 (signal err)))))
4294 4294
4295(ert-deftest tramp-test21-file-links () 4295(ert-deftest tramp-test21-file-links ()
4296 "Check `file-symlink-p'. 4296 "Check `file-symlink-p'.
diff --git a/test/lisp/proced-tests.el b/test/lisp/proced-tests.el
index fce3c2bc048..52d1e8850ca 100644
--- a/test/lisp/proced-tests.el
+++ b/test/lisp/proced-tests.el
@@ -61,7 +61,7 @@
61 (proced--move-to-column "%CPU") 61 (proced--move-to-column "%CPU")
62 (condition-case err 62 (condition-case err
63 (>= (proced--cpu-at-point) cpu) 63 (>= (proced--cpu-at-point) cpu)
64 (ert-test-skipped (signal (car err) (cdr err))) 64 (ert-test-skipped (signal err))
65 (error 65 (error
66 (ert-fail 66 (ert-fail
67 (list err (proced--assert-process-valid-cpu-refinement-explainer cpu)))))) 67 (list err (proced--assert-process-valid-cpu-refinement-explainer cpu))))))
diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el
index e93ee72210d..96fa3d65c05 100644
--- a/test/lisp/vc/vc-git-tests.el
+++ b/test/lisp/vc/vc-git-tests.el
@@ -111,7 +111,7 @@ If the exit status is non-zero, log the command output and re-throw."
111 (apply 'vc-git-command t 0 nil args) 111 (apply 'vc-git-command t 0 nil args)
112 (t (message "Error running Git: %s" err) 112 (t (message "Error running Git: %s" err)
113 (message "(buffer-string:\n%s\n)" (buffer-string)) 113 (message "(buffer-string:\n%s\n)" (buffer-string))
114 (signal (car err) (cdr err)))) 114 (signal err)))
115 (buffer-string))) 115 (buffer-string)))
116 116
117(defun vc-git-test--start-branch () 117(defun vc-git-test--start-branch ()
diff --git a/test/lisp/vc/vc-tests/vc-tests.el b/test/lisp/vc/vc-tests/vc-tests.el
index ca79a340a46..737ee09415e 100644
--- a/test/lisp/vc/vc-tests/vc-tests.el
+++ b/test/lisp/vc/vc-tests/vc-tests.el
@@ -238,8 +238,7 @@ For backends which don't support it, `vc-not-supported' is signaled."
238Catch the `vc-not-supported' error." 238Catch the `vc-not-supported' error."
239 `(condition-case err 239 `(condition-case err
240 (funcall ,func ,@args) 240 (funcall ,func ,@args)
241 (vc-not-supported 'vc-not-supported) 241 (vc-not-supported 'vc-not-supported)))
242 (t (signal (car err) (cdr err)))))
243 242
244(defun vc-test--register (backend) 243(defun vc-test--register (backend)
245 "Register and unregister a file. 244 "Register and unregister a file.