diff options
| author | Michael Albinus | 2015-06-03 20:03:42 +0200 |
|---|---|---|
| committer | Michael Albinus | 2015-06-03 20:03:42 +0200 |
| commit | 0c182b332d455b19c72e4bdd77bc7a728ac1e380 (patch) | |
| tree | 322f20e3a218d588ebeba3e1bddb6ad6d28435f1 /test | |
| parent | 68529c89faf04a638ddea5e910d0684effa1d7c5 (diff) | |
| download | emacs-0c182b332d455b19c72e4bdd77bc7a728ac1e380.tar.gz emacs-0c182b332d455b19c72e4bdd77bc7a728ac1e380.zip | |
Fix error introduced recently in file-notify-tests.el
* test/automated/file-notify-tests.el
(file-notify--test-remote-enabled): Do not use `file-notify--test-desc'.
(file-notify--deftest-remote): Revert previous patch, not
necessary anymore.
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/file-notify-tests.el | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index 806bdd73bd1..11589b99295 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el | |||
| @@ -85,21 +85,18 @@ being the result.") | |||
| 85 | (defun file-notify--test-remote-enabled () | 85 | (defun file-notify--test-remote-enabled () |
| 86 | "Whether remote file notification is enabled." | 86 | "Whether remote file notification is enabled." |
| 87 | (unless (consp file-notify--test-remote-enabled-checked) | 87 | (unless (consp file-notify--test-remote-enabled-checked) |
| 88 | (unwind-protect | 88 | (let (desc) |
| 89 | (ignore-errors | 89 | (ignore-errors |
| 90 | (and | 90 | (and |
| 91 | (file-remote-p file-notify-test-remote-temporary-file-directory) | 91 | (file-remote-p file-notify-test-remote-temporary-file-directory) |
| 92 | (file-directory-p file-notify-test-remote-temporary-file-directory) | 92 | (file-directory-p file-notify-test-remote-temporary-file-directory) |
| 93 | (file-writable-p file-notify-test-remote-temporary-file-directory) | 93 | (file-writable-p file-notify-test-remote-temporary-file-directory) |
| 94 | (setq file-notify--test-desc | 94 | (setq desc |
| 95 | (file-notify-add-watch | 95 | (file-notify-add-watch |
| 96 | file-notify-test-remote-temporary-file-directory | 96 | file-notify-test-remote-temporary-file-directory |
| 97 | '(change) 'ignore)))) | 97 | '(change) 'ignore)))) |
| 98 | ;; Unwind forms. | 98 | (setq file-notify--test-remote-enabled-checked (cons t desc)) |
| 99 | (setq file-notify--test-remote-enabled-checked | 99 | (when desc (file-notify-rm-watch desc)))) |
| 100 | (cons t file-notify--test-desc)) | ||
| 101 | (when file-notify--test-desc | ||
| 102 | (file-notify-rm-watch file-notify--test-desc)))) | ||
| 103 | ;; Return result. | 100 | ;; Return result. |
| 104 | (cdr file-notify--test-remote-enabled-checked)) | 101 | (cdr file-notify--test-remote-enabled-checked)) |
| 105 | 102 | ||
| @@ -108,21 +105,17 @@ being the result.") | |||
| 108 | (declare (indent 1)) | 105 | (declare (indent 1)) |
| 109 | `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) () | 106 | `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) () |
| 110 | ,docstring | 107 | ,docstring |
| 111 | (condition-case err | 108 | (let* ((temporary-file-directory |
| 112 | (let* ((temporary-file-directory | 109 | file-notify-test-remote-temporary-file-directory) |
| 113 | file-notify-test-remote-temporary-file-directory) | 110 | (ert-test (ert-get-test ',test))) |
| 114 | (ert-test (ert-get-test ',test))) | 111 | (skip-unless (file-notify--test-remote-enabled)) |
| 115 | (skip-unless (file-notify--test-remote-enabled)) | 112 | (tramp-cleanup-connection |
| 116 | (tramp-cleanup-connection | 113 | (tramp-dissect-file-name temporary-file-directory) nil 'keep-password) |
| 117 | (tramp-dissect-file-name temporary-file-directory) | 114 | (funcall (ert-test-body ert-test))))) |
| 118 | nil 'keep-password) | ||
| 119 | (funcall (ert-test-body ert-test))) | ||
| 120 | ((error quit) (ert-fail err))))) | ||
| 121 | 115 | ||
| 122 | (ert-deftest file-notify-test00-availability () | 116 | (ert-deftest file-notify-test00-availability () |
| 123 | "Test availability of `file-notify'." | 117 | "Test availability of `file-notify'." |
| 124 | (skip-unless (file-notify--test-local-enabled)) | 118 | (skip-unless (file-notify--test-local-enabled)) |
| 125 | ;; Check, that different valid parameters are accepted. | ||
| 126 | (should | 119 | (should |
| 127 | (setq file-notify--test-desc | 120 | (setq file-notify--test-desc |
| 128 | (file-notify-add-watch temporary-file-directory '(change) 'ignore))) | 121 | (file-notify-add-watch temporary-file-directory '(change) 'ignore))) |