From 1b0ec9f1b5c2587d6cd402f59f8ec14d81d3e551 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 19 May 2017 13:57:36 +0200 Subject: [PATCH] Minor tweaks in tramp-tests.el * test/lisp/net/tramp-tests.el (tramp--test-afp-or-smb-p): New defun. (tramp-test05-expand-file-name-relative): Use it. (tramp-test38-unload): Run only in batch mode. --- test/lisp/net/tramp-tests.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index bcf2e840fd7..49c32dbaaf2 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -1622,6 +1622,13 @@ handled properly. BODY shall not contain a timeout." "Check `expand-file-name'." ;; Mark as failed until bug has been fixed. :expected-result :failed + (skip-unless (tramp--test-enabled)) + ;; File names with a share behave differently. + (when (tramp--test-afp-or-smb-p) + (setf (ert-test-expected-result-type + (ert-get-test 'tramp-test05-expand-file-name-relative)) + :passed)) + (should (string-equal (let ((default-directory @@ -3220,6 +3227,13 @@ This requires restrictions of file name syntax." (or (eq system-type 'windows-nt) (tramp-smb-file-name-p tramp-test-temporary-file-directory))) +(defun tramp--test-afp-or-smb-p () + "Check, whether the afp or smb method is used. +This requires an additional share name." + (or (string-equal + "afp" (file-remote-p tramp-test-temporary-file-directory 'method)) + (tramp-smb-file-name-p tramp-test-temporary-file-directory))) + (defun tramp--test-check-files (&rest files) "Run a simple but comprehensive test over every file in FILES." ;; TODO: The quoted case does not work. @@ -3708,6 +3722,8 @@ Since it unloads Tramp, it shall be the last test to run." ;; Mark as failed until all symbols are unbound. :expected-result (if (featurep 'tramp) :failed :passed) :tags '(:expensive-test) + (skip-unless noninteractive) + (when (featurep 'tramp) (unload-feature 'tramp 'force) ;; No Tramp feature must be left. -- 2.39.2