emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master a62306b: Instrument file-notify-test.el in order to


From: Michael Albinus
Subject: [Emacs-diffs] master a62306b: Instrument file-notify-test.el in order to catch hydra error.
Date: Wed, 03 Jun 2015 12:07:15 +0000

branch: master
commit a62306bbcbd1c0c9c047c62be6ead34cd7be75df
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Instrument file-notify-test.el in order to catch hydra error.
    
    * test/automated/file-notify-tests.el (file-notify--deftest-remote):
    Wrap body by `ignore-case', in order to trap non-local errors.
---
 test/automated/file-notify-tests.el |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/test/automated/file-notify-tests.el 
b/test/automated/file-notify-tests.el
index a45eff7..806bdd7 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -105,15 +105,19 @@ being the result.")
 
 (defmacro file-notify--deftest-remote (test docstring)
   "Define ert `TEST-remote' for remote files."
+  (declare (indent 1))
   `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) ()
      ,docstring
-     (let* ((temporary-file-directory
-            file-notify-test-remote-temporary-file-directory)
-           (ert-test (ert-get-test ',test)))
-       (skip-unless (file-notify--test-remote-enabled))
-       (tramp-cleanup-connection
-       (tramp-dissect-file-name temporary-file-directory) nil 'keep-password)
-       (funcall (ert-test-body ert-test)))))
+     (condition-case err
+         (let* ((temporary-file-directory
+                 file-notify-test-remote-temporary-file-directory)
+                (ert-test (ert-get-test ',test)))
+           (skip-unless (file-notify--test-remote-enabled))
+           (tramp-cleanup-connection
+            (tramp-dissect-file-name temporary-file-directory)
+            nil 'keep-password)
+           (funcall (ert-test-body ert-test)))
+         ((error quit) (ert-fail err)))))
 
 (ert-deftest file-notify-test00-availability ()
   "Test availability of `file-notify'."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]