aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/lisp/net/tramp-tests.el64
1 files changed, 36 insertions, 28 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 75c7ac6ca4a..5fc37c1934f 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2794,7 +2794,9 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
2794 ;; returns `file-missing'. 2794 ;; returns `file-missing'.
2795 (delete-directory tmp-name1 'recursive) 2795 (delete-directory tmp-name1 'recursive)
2796 (with-temp-buffer 2796 (with-temp-buffer
2797 (should-error (insert-directory tmp-name1 nil)))) 2797 (should-error
2798 (insert-directory tmp-name1 nil)
2799 :type tramp-file-missing)))
2798 2800
2799 ;; Cleanup. 2801 ;; Cleanup.
2800 (ignore-errors (delete-directory tmp-name1 'recursive)))))) 2802 (ignore-errors (delete-directory tmp-name1 'recursive))))))
@@ -3962,7 +3964,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3962 :tags '(:expensive-test) 3964 :tags '(:expensive-test)
3963 (skip-unless (tramp--test-enabled)) 3965 (skip-unless (tramp--test-enabled))
3964 (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) 3966 (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
3965 ;; `make-process' supports file name handlers since Emacs 27. 3967 ;; `make-process' has been inserted in Emacs 25.1. It supports file
3968 ;; name handlers since Emacs 27.
3966 (skip-unless (tramp--test-emacs27-p)) 3969 (skip-unless (tramp--test-emacs27-p))
3967 3970
3968 (tramp--test-instrument-test-case 0 3971 (tramp--test-instrument-test-case 0
@@ -3970,15 +3973,16 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3970 (let ((default-directory tramp-test-temporary-file-directory) 3973 (let ((default-directory tramp-test-temporary-file-directory)
3971 (tmp-name (tramp--test-make-temp-name nil quoted)) 3974 (tmp-name (tramp--test-make-temp-name nil quoted))
3972 kill-buffer-query-functions proc) 3975 kill-buffer-query-functions proc)
3973 (should-not (make-process)) 3976 (should-not (with-no-warnings (make-process)))
3974 3977
3975 ;; Simple process. 3978 ;; Simple process.
3976 (unwind-protect 3979 (unwind-protect
3977 (with-temp-buffer 3980 (with-temp-buffer
3978 (setq proc 3981 (setq proc
3979 (make-process 3982 (with-no-warnings
3980 :name "test1" :buffer (current-buffer) :command '("cat") 3983 (make-process
3981 :file-handler t)) 3984 :name "test1" :buffer (current-buffer) :command '("cat")
3985 :file-handler t)))
3982 (should (processp proc)) 3986 (should (processp proc))
3983 (should (equal (process-status proc) 'run)) 3987 (should (equal (process-status proc) 'run))
3984 (process-send-string proc "foo") 3988 (process-send-string proc "foo")
@@ -4000,10 +4004,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4000 (write-region "foo" nil tmp-name) 4004 (write-region "foo" nil tmp-name)
4001 (should (file-exists-p tmp-name)) 4005 (should (file-exists-p tmp-name))
4002 (setq proc 4006 (setq proc
4003 (make-process 4007 (with-no-warnings
4004 :name "test2" :buffer (current-buffer) 4008 (make-process
4005 :command `("cat" ,(file-name-nondirectory tmp-name)) 4009 :name "test2" :buffer (current-buffer)
4006 :file-handler t)) 4010 :command `("cat" ,(file-name-nondirectory tmp-name))
4011 :file-handler t)))
4007 (should (processp proc)) 4012 (should (processp proc))
4008 ;; Read output. 4013 ;; Read output.
4009 (with-timeout (10 (tramp--test-timeout-handler)) 4014 (with-timeout (10 (tramp--test-timeout-handler))
@@ -4020,12 +4025,13 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4020 (unwind-protect 4025 (unwind-protect
4021 (with-temp-buffer 4026 (with-temp-buffer
4022 (setq proc 4027 (setq proc
4023 (make-process 4028 (with-no-warnings
4024 :name "test3" :buffer (current-buffer) :command '("cat") 4029 (make-process
4025 :filter 4030 :name "test3" :buffer (current-buffer) :command '("cat")
4026 (lambda (p s) 4031 :filter
4027 (with-current-buffer (process-buffer p) (insert s))) 4032 (lambda (p s)
4028 :file-handler t)) 4033 (with-current-buffer (process-buffer p) (insert s)))
4034 :file-handler t)))
4029 (should (processp proc)) 4035 (should (processp proc))
4030 (should (equal (process-status proc) 'run)) 4036 (should (equal (process-status proc) 'run))
4031 (process-send-string proc "foo") 4037 (process-send-string proc "foo")
@@ -4045,12 +4051,13 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4045 (unwind-protect 4051 (unwind-protect
4046 (with-temp-buffer 4052 (with-temp-buffer
4047 (setq proc 4053 (setq proc
4048 (make-process 4054 (with-no-warnings
4049 :name "test4" :buffer (current-buffer) :command '("cat") 4055 (make-process
4050 :sentinel 4056 :name "test4" :buffer (current-buffer) :command '("cat")
4051 (lambda (p s) 4057 :sentinel
4052 (with-current-buffer (process-buffer p) (insert s))) 4058 (lambda (p s)
4053 :file-handler t)) 4059 (with-current-buffer (process-buffer p) (insert s)))
4060 :file-handler t)))
4054 (should (processp proc)) 4061 (should (processp proc))
4055 (should (equal (process-status proc) 'run)) 4062 (should (equal (process-status proc) 'run))
4056 (process-send-string proc "foo") 4063 (process-send-string proc "foo")
@@ -4073,11 +4080,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4073 (unwind-protect 4080 (unwind-protect
4074 (with-temp-buffer 4081 (with-temp-buffer
4075 (setq proc 4082 (setq proc
4076 (make-process 4083 (with-no-warnings
4077 :name "test5" :buffer (current-buffer) 4084 (make-process
4078 :command '("cat" "/") 4085 :name "test5" :buffer (current-buffer)
4079 :stderr stderr 4086 :command '("cat" "/")
4080 :file-handler t)) 4087 :stderr stderr
4088 :file-handler t)))
4081 (should (processp proc)) 4089 (should (processp proc))
4082 ;; Read stderr. 4090 ;; Read stderr.
4083 (with-current-buffer stderr 4091 (with-current-buffer stderr
@@ -5755,7 +5763,7 @@ Since it unloads Tramp, it shall be the last test to run."
5755 (ert-fail (format "`%s' still bound" x))))) 5763 (ert-fail (format "`%s' still bound" x)))))
5756 ;; The defstruct `tramp-file-name' and all its internal functions 5764 ;; The defstruct `tramp-file-name' and all its internal functions
5757 ;; shall be purged. 5765 ;; shall be purged.
5758 (should-not (cl--find-class 'tramp-file-name)) 5766 (should-not (with-no-warnings (cl--find-class 'tramp-file-name)))
5759 (mapatoms 5767 (mapatoms
5760 (lambda (x) 5768 (lambda (x)
5761 (and (functionp x) 5769 (and (functionp x)