]> git.eshelyaron.com Git - emacs.git/commitdiff
Instrument file-notify-test.el in order to catch hydra error.
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 3 Jun 2015 12:07:06 +0000 (14:07 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 3 Jun 2015 12:07:06 +0000 (14:07 +0200)
* 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

index a45eff739578855737638a0060713d32d79800d6..806bdd73bd116ab632abf995193438d08f011416 100644 (file)
@@ -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'."