[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1b0ec9f 2/2: Minor tweaks in tramp-tests.el
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 1b0ec9f 2/2: Minor tweaks in tramp-tests.el |
Date: |
Fri, 19 May 2017 07:57:44 -0400 (EDT) |
branch: master
commit 1b0ec9f1b5c2587d6cd402f59f8ec14d81d3e551
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
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 bcf2e84..49c32db 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.