]> git.eshelyaron.com Git - emacs.git/commitdiff
; Instrument proced-tests.el further
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 4 Nov 2024 13:24:21 +0000 (14:24 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 9 Nov 2024 15:47:04 +0000 (16:47 +0100)
* test/lisp/proced-tests.el
(proced--assert-process-valid-cpu-refinement): Explain also Lisp errors.

(cherry picked from commit 37b1799c9e5677db35ac509729a29fb7cd44cf39)

test/lisp/proced-tests.el

index 5d6f9e9f16473539ebd6cc646e792e3f57a37cd8..5c9dfaca109b8f78f9dfadf8c5aa2846327574a0 100644 (file)
 (defun proced--assert-process-valid-cpu-refinement (cpu)
   "Fail unless the process at point could be present after a refinement using CPU."
   (proced--move-to-column "%CPU")
-  (>= (thing-at-point 'number) cpu))
+  (condition-case err
+      (>= (thing-at-point 'number) cpu)
+    (error
+     (ert-fail
+      (list err (proced--assert-process-valid-cpu-refinement-explainer cpu))))))
 
 (defun proced--assert-process-valid-cpu-refinement-explainer (cpu)
   "Explain the result of `proced--assert-process-valid-cpu-refinement'.