diff options
| author | Michael Albinus | 2017-06-05 12:59:26 +0200 |
|---|---|---|
| committer | Michael Albinus | 2017-06-05 12:59:26 +0200 |
| commit | 751d5920bed1a3af01fd5a31ce4eb7d8b6994151 (patch) | |
| tree | 3c36953d038777d070bbbba1263fea26de7d57ea | |
| parent | 792de924d54a0d6d3ac33fddfa9d6698c5ba2110 (diff) | |
| download | emacs-751d5920bed1a3af01fd5a31ce4eb7d8b6994151.tar.gz emacs-751d5920bed1a3af01fd5a31ce4eb7d8b6994151.zip | |
Some minor tweaks in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative):
Let it pass for all gfvs based methods.
(tramp-test24-file-name-completion): Run method and host
completion for all syntaxes only when expensive tests are enabled.
Do not check host completion for gvfs based methods.
(tramp--test-gvfs-p): Add optional METHOD argument.
(tramp--test-afp-or-smb-p): Remove.
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 8c97fafa3e6..6876f20d41c 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -1625,8 +1625,9 @@ handled properly. BODY shall not contain a timeout." | |||
| 1625 | ;; Mark as failed until bug has been fixed. | 1625 | ;; Mark as failed until bug has been fixed. |
| 1626 | :expected-result :failed | 1626 | :expected-result :failed |
| 1627 | (skip-unless (tramp--test-enabled)) | 1627 | (skip-unless (tramp--test-enabled)) |
| 1628 | ;; File names with a share behave differently. | 1628 | ;; These are the methods the test doesn't fail. |
| 1629 | (when (or (tramp--test-adb-p) (tramp--test-afp-or-smb-p)) | 1629 | (when (or (tramp--test-adb-p) (tramp--test-gvfs-p) |
| 1630 | (tramp-smb-file-name-p tramp-test-temporary-file-directory)) | ||
| 1630 | (setf (ert-test-expected-result-type | 1631 | (setf (ert-test-expected-result-type |
| 1631 | (ert-get-test 'tramp-test05-expand-file-name-relative)) | 1632 | (ert-get-test 'tramp-test05-expand-file-name-relative)) |
| 1632 | :passed)) | 1633 | :passed)) |
| @@ -2502,7 +2503,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 2502 | (orig-syntax tramp-syntax)) | 2503 | (orig-syntax tramp-syntax)) |
| 2503 | 2504 | ||
| 2504 | (unwind-protect | 2505 | (unwind-protect |
| 2505 | (dolist (syntax (tramp-syntax-values)) | 2506 | (dolist |
| 2507 | (syntax | ||
| 2508 | (if tramp--test-expensive-test | ||
| 2509 | (tramp-syntax-values) `(,orig-syntax))) | ||
| 2506 | (tramp-change-syntax syntax) | 2510 | (tramp-change-syntax syntax) |
| 2507 | (let ;; This is needed for the `simplified' syntax. | 2511 | (let ;; This is needed for the `simplified' syntax. |
| 2508 | ((method-marker | 2512 | ((method-marker |
| @@ -2518,9 +2522,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 2518 | (concat prefix-format method (tramp-postfix-method-format)) | 2522 | (concat prefix-format method (tramp-postfix-method-format)) |
| 2519 | (file-name-all-completions | 2523 | (file-name-all-completions |
| 2520 | (concat prefix-format (substring method 0 1)) "/")))) | 2524 | (concat prefix-format (substring method 0 1)) "/")))) |
| 2521 | ;; Complete host name for default method. | 2525 | ;; Complete host name for default method. With gvfs |
| 2522 | (unless (zerop (length host)) | 2526 | ;; based methods, host name will be determined as |
| 2523 | (let ((tramp-default-method (or method tramp-default-method))) | 2527 | ;; host.local, so we omit the test. |
| 2528 | (let ((tramp-default-method (or method tramp-default-method))) | ||
| 2529 | (unless (or (zerop (length host)) | ||
| 2530 | (tramp--test-gvfs-p tramp-default-method)) | ||
| 2524 | (should | 2531 | (should |
| 2525 | (member | 2532 | (member |
| 2526 | (concat | 2533 | (concat |
| @@ -2534,7 +2541,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 2534 | ;; Complete host name. | 2541 | ;; Complete host name. |
| 2535 | (unless (or (zerop (length method)) | 2542 | (unless (or (zerop (length method)) |
| 2536 | (zerop (length (tramp-method-regexp))) | 2543 | (zerop (length (tramp-method-regexp))) |
| 2537 | (zerop (length host))) | 2544 | (zerop (length host)) |
| 2545 | (tramp--test-gvfs-p method)) | ||
| 2538 | (should | 2546 | (should |
| 2539 | (member | 2547 | (member |
| 2540 | (concat | 2548 | (concat |
| @@ -3224,10 +3232,11 @@ This does not support globbing characters in file names (yet)." | |||
| 3224 | (string-match | 3232 | (string-match |
| 3225 | "ftp$" (file-remote-p tramp-test-temporary-file-directory 'method))) | 3233 | "ftp$" (file-remote-p tramp-test-temporary-file-directory 'method))) |
| 3226 | 3234 | ||
| 3227 | (defun tramp--test-gvfs-p () | 3235 | (defun tramp--test-gvfs-p (&optional method) |
| 3228 | "Check, whether the remote host runs a GVFS based method. | 3236 | "Check, whether the remote host runs a GVFS based method. |
| 3229 | This requires restrictions of file name syntax." | 3237 | This requires restrictions of file name syntax." |
| 3230 | (tramp-gvfs-file-name-p tramp-test-temporary-file-directory)) | 3238 | (or (member method tramp-gvfs-methods) |
| 3239 | (tramp-gvfs-file-name-p tramp-test-temporary-file-directory))) | ||
| 3231 | 3240 | ||
| 3232 | (defun tramp--test-hpux-p () | 3241 | (defun tramp--test-hpux-p () |
| 3233 | "Check, whether the remote host runs HP-UX. | 3242 | "Check, whether the remote host runs HP-UX. |
| @@ -3268,13 +3277,6 @@ This requires restrictions of file name syntax." | |||
| 3268 | (or (eq system-type 'windows-nt) | 3277 | (or (eq system-type 'windows-nt) |
| 3269 | (tramp-smb-file-name-p tramp-test-temporary-file-directory))) | 3278 | (tramp-smb-file-name-p tramp-test-temporary-file-directory))) |
| 3270 | 3279 | ||
| 3271 | (defun tramp--test-afp-or-smb-p () | ||
| 3272 | "Check, whether the afp or smb method is used. | ||
| 3273 | This requires an additional share name." | ||
| 3274 | (or (string-equal | ||
| 3275 | "afp" (file-remote-p tramp-test-temporary-file-directory 'method)) | ||
| 3276 | (tramp-smb-file-name-p tramp-test-temporary-file-directory))) | ||
| 3277 | |||
| 3278 | (defun tramp--test-check-files (&rest files) | 3280 | (defun tramp--test-check-files (&rest files) |
| 3279 | "Run a simple but comprehensive test over every file in FILES." | 3281 | "Run a simple but comprehensive test over every file in FILES." |
| 3280 | ;; TODO: The quoted case does not work. | 3282 | ;; TODO: The quoted case does not work. |