(add-to-list 'tramp-methods
`("telnet"
(tramp-login-program "telnet")
- (tramp-login-args (("%h") ("%p") ("%n")))
+ (tramp-login-args (("%h") ("%p")))
(tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("nc"
(tramp-login-program "telnet")
- (tramp-login-args (("%h") ("%p") ("%n")))
+ (tramp-login-args (("%h") ("%p")))
(tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(ignore-errors (delete-directory source 'recursive))
(ignore-errors (delete-directory target 'recursive))))))))
-(defun tramp-test-make-directory-helper (test-default-file-modes-p)
- "Helper test used by tramp-test13-make-directory* tests."
- (dolist (quoted (if (and (tramp--test-expensive-test)
- (not test-default-file-modes-p))
- '(nil t)
- '(nil)))
+(ert-deftest tramp-test13-make-directory ()
+ "Check `make-directory'.
+This tests also `file-directory-p' and `file-accessible-directory-p'."
+ (skip-unless (tramp--test-enabled))
+
+ (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
(let* ((tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (expand-file-name "foo/bar" tmp-name1))
(unusual-file-mode-1 #o740)
:type 'file-already-exists)
(should (file-directory-p tmp-name1))
(should (file-accessible-directory-p tmp-name1))
- (and test-default-file-modes-p
- (should (equal (format "%#o" unusual-file-mode-1)
- (format "%#o" (file-modes tmp-name1)))))
+ (when (tramp--test-supports-file-modes-p)
+ (should (equal (format "%#o" unusual-file-mode-1)
+ (format "%#o" (file-modes tmp-name1)))))
(should-error
(make-directory tmp-name2)
:type 'file-error)
(make-directory tmp-name2 'parents))
(should (file-directory-p tmp-name2))
(should (file-accessible-directory-p tmp-name2))
- (and test-default-file-modes-p
- (should (equal (format "%#o" unusual-file-mode-2)
- (format "%#o" (file-modes tmp-name2)))))
+ (when (tramp--test-supports-file-modes-p)
+ (should (equal (format "%#o" unusual-file-mode-2)
+ (format "%#o" (file-modes tmp-name2)))))
;; If PARENTS is non-nil, `make-directory' shall not
;; signal an error when DIR exists already.
(make-directory tmp-name2 'parents))
;; Cleanup.
(ignore-errors (delete-directory tmp-name1 'recursive))))))
-(ert-deftest tramp-test13-make-directory ()
- "Check `make-directory'.
-This tests also `file-directory-p' and `file-accessible-directory-p'."
- (skip-unless (tramp--test-enabled))
- (tramp-test-make-directory-helper nil))
-
-(ert-deftest tramp-test13-make-directory-with-file-modes ()
- "Check that `make-directory' honors `default-file-modes'.
-This is a separate test from `tramp-test13-make-directory' so
-it can be skipped for backends that do not support file modes."
- (skip-unless (tramp--test-enabled))
- (skip-unless (tramp--test-supports-file-modes-p))
- (tramp-test-make-directory-helper t))
-
(ert-deftest tramp-test14-delete-directory ()
"Check `delete-directory'."
(skip-unless (tramp--test-enabled))
(cond
((getenv "EMACS_HYDRA_CI") 10)
(t 1)))
- ;; We must distinguish due to performance reasons.
- (timer-operation
- (cond
- ((tramp--test-mock-p) #'vc-registered)
- (t #'file-attributes)))
;; This is when all timers start. We check inside the
;; timer function, that we don't exceed timeout.
(timer-start (current-time))
(cons 'remote-file-error debug-ignored-errors)))
(tramp--test-message
"Start timer %s %s" file (current-time-string))
- (funcall timer-operation file)
+ (vc-registered file)
(tramp--test-message
"Stop timer %s %s" file (current-time-string))
;; Adjust timer if it takes too much time.