diff options
| author | Michael Albinus | 2019-02-28 10:33:05 +0100 |
|---|---|---|
| committer | Michael Albinus | 2019-02-28 10:33:05 +0100 |
| commit | a80e10458a6e85b64936085f95354cdde5aa847b (patch) | |
| tree | bbf3967570a3d2e30fd694501eec0ecbcd7afdca /test | |
| parent | 4927f94792ffaab985e0aa3c977eb19308f067cf (diff) | |
| download | emacs-a80e10458a6e85b64936085f95354cdde5aa847b.tar.gz emacs-a80e10458a6e85b64936085f95354cdde5aa847b.zip | |
Use proper read syntax for all function names in Tramp
* lisp/net/tramp.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-compat.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sudoedit.el:
* test/lisp/net/tramp-archive-tests.el:
* test/lisp/net/tramp-tests.el: Use proper read syntax for all
function names.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-archive-tests.el | 18 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 103 |
2 files changed, 61 insertions, 60 deletions
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 9f06ab1000c..76290cf37f4 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el | |||
| @@ -78,7 +78,7 @@ the origin of the temporary TMPFILE, have no write permissions." | |||
| 78 | (if (file-regular-p tmpfile) | 78 | (if (file-regular-p tmpfile) |
| 79 | (delete-file tmpfile) | 79 | (delete-file tmpfile) |
| 80 | (mapc | 80 | (mapc |
| 81 | 'tramp-archive--test-delete | 81 | #'tramp-archive--test-delete |
| 82 | (directory-files tmpfile 'full directory-files-no-dot-files-regexp)) | 82 | (directory-files tmpfile 'full directory-files-no-dot-files-regexp)) |
| 83 | (delete-directory tmpfile))) | 83 | (delete-directory tmpfile))) |
| 84 | 84 | ||
| @@ -662,7 +662,7 @@ This tests also `access-file', `file-readable-p' and `file-regular-p'." | |||
| 662 | (dolist (elt attr) | 662 | (dolist (elt attr) |
| 663 | (should (equal (file-attributes (car elt)) (cdr elt)))) | 663 | (should (equal (file-attributes (car elt)) (cdr elt)))) |
| 664 | (setq attr (directory-files-and-attributes tmp-name nil "^b")) | 664 | (setq attr (directory-files-and-attributes tmp-name nil "^b")) |
| 665 | (should (equal (mapcar 'car attr) '("bar")))) | 665 | (should (equal (mapcar #'car attr) '("bar")))) |
| 666 | 666 | ||
| 667 | ;; Cleanup. | 667 | ;; Cleanup. |
| 668 | (tramp-archive-cleanup-hash)))) | 668 | (tramp-archive-cleanup-hash)))) |
| @@ -752,14 +752,14 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." | |||
| 752 | (should-not (file-name-completion "a" tmp-name)) | 752 | (should-not (file-name-completion "a" tmp-name)) |
| 753 | (should | 753 | (should |
| 754 | (equal | 754 | (equal |
| 755 | (file-name-completion "b" tmp-name 'file-directory-p) "bar/")) | 755 | (file-name-completion "b" tmp-name #'file-directory-p) "bar/")) |
| 756 | (should | 756 | (should |
| 757 | (equal | 757 | (equal |
| 758 | (sort (file-name-all-completions "fo" tmp-name) 'string-lessp) | 758 | (sort (file-name-all-completions "fo" tmp-name) #'string-lessp) |
| 759 | '("foo.hrd" "foo.lnk" "foo.txt"))) | 759 | '("foo.hrd" "foo.lnk" "foo.txt"))) |
| 760 | (should | 760 | (should |
| 761 | (equal | 761 | (equal |
| 762 | (sort (file-name-all-completions "b" tmp-name) 'string-lessp) | 762 | (sort (file-name-all-completions "b" tmp-name) #'string-lessp) |
| 763 | '("bar/" "baz.tar"))) | 763 | '("bar/" "baz.tar"))) |
| 764 | (should-not (file-name-all-completions "a" tmp-name)) | 764 | (should-not (file-name-all-completions "a" tmp-name)) |
| 765 | ;; `completion-regexp-list' restricts the completion to | 765 | ;; `completion-regexp-list' restricts the completion to |
| @@ -770,7 +770,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." | |||
| 770 | (equal (file-name-completion "" tmp-name) "ba")) | 770 | (equal (file-name-completion "" tmp-name) "ba")) |
| 771 | (should | 771 | (should |
| 772 | (equal | 772 | (equal |
| 773 | (sort (file-name-all-completions "" tmp-name) 'string-lessp) | 773 | (sort (file-name-all-completions "" tmp-name) #'string-lessp) |
| 774 | '("bar/" "baz.tar"))))) | 774 | '("bar/" "baz.tar"))))) |
| 775 | 775 | ||
| 776 | ;; Cleanup. | 776 | ;; Cleanup. |
| @@ -859,7 +859,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." | |||
| 859 | "%s -batch -Q -L %s --eval %s" | 859 | "%s -batch -Q -L %s --eval %s" |
| 860 | (shell-quote-argument | 860 | (shell-quote-argument |
| 861 | (expand-file-name invocation-name invocation-directory)) | 861 | (expand-file-name invocation-name invocation-directory)) |
| 862 | (mapconcat 'shell-quote-argument load-path " -L ") | 862 | (mapconcat #'shell-quote-argument load-path " -L ") |
| 863 | (shell-quote-argument (format code file))))))))) | 863 | (shell-quote-argument (format code file))))))))) |
| 864 | 864 | ||
| 865 | (ert-deftest tramp-archive-test44-delay-load () | 865 | (ert-deftest tramp-archive-test44-delay-load () |
| @@ -896,7 +896,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." | |||
| 896 | "%s -batch -Q -L %s --eval %s" | 896 | "%s -batch -Q -L %s --eval %s" |
| 897 | (shell-quote-argument | 897 | (shell-quote-argument |
| 898 | (expand-file-name invocation-name invocation-directory)) | 898 | (expand-file-name invocation-name invocation-directory)) |
| 899 | (mapconcat 'shell-quote-argument load-path " -L ") | 899 | (mapconcat #'shell-quote-argument load-path " -L ") |
| 900 | (shell-quote-argument | 900 | (shell-quote-argument |
| 901 | (format | 901 | (format |
| 902 | code tae tramp-archive-test-file-archive | 902 | code tae tramp-archive-test-file-archive |
| @@ -958,7 +958,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." | |||
| 958 | "Run all tests for \\[tramp-archive]." | 958 | "Run all tests for \\[tramp-archive]." |
| 959 | (interactive "p") | 959 | (interactive "p") |
| 960 | (funcall | 960 | (funcall |
| 961 | (if interactive 'ert-run-tests-interactively 'ert-run-tests-batch) | 961 | (if interactive #'ert-run-tests-interactively #'ert-run-tests-batch) |
| 962 | "^tramp-archive")) | 962 | "^tramp-archive")) |
| 963 | 963 | ||
| 964 | (provide 'tramp-archive-tests) | 964 | (provide 'tramp-archive-tests) |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 3afe9ad557d..732b4f313ff 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -68,7 +68,7 @@ | |||
| 68 | ;; Beautify batch mode. | 68 | ;; Beautify batch mode. |
| 69 | (when noninteractive | 69 | (when noninteractive |
| 70 | ;; Suppress nasty messages. | 70 | ;; Suppress nasty messages. |
| 71 | (fset 'shell-command-sentinel 'ignore) | 71 | (fset #'shell-command-sentinel #'ignore) |
| 72 | ;; We do not want to be interrupted. | 72 | ;; We do not want to be interrupted. |
| 73 | (eval-after-load 'tramp-gvfs | 73 | (eval-after-load 'tramp-gvfs |
| 74 | '(fset 'tramp-gvfs-handler-askquestion | 74 | '(fset 'tramp-gvfs-handler-askquestion |
| @@ -149,7 +149,7 @@ If LOCAL is non-nil, a local file name is returned. | |||
| 149 | If QUOTED is non-nil, the local part of the file name is quoted. | 149 | If QUOTED is non-nil, the local part of the file name is quoted. |
| 150 | The temporary file is not created." | 150 | The temporary file is not created." |
| 151 | (funcall | 151 | (funcall |
| 152 | (if quoted 'tramp-compat-file-name-quote 'identity) | 152 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 153 | (expand-file-name | 153 | (expand-file-name |
| 154 | (make-temp-name "tramp-test") | 154 | (make-temp-name "tramp-test") |
| 155 | (if local temporary-file-directory tramp-test-temporary-file-directory)))) | 155 | (if local temporary-file-directory tramp-test-temporary-file-directory)))) |
| @@ -185,7 +185,7 @@ properly. BODY shall not contain a timeout." | |||
| 185 | "Emit a message into ERT *Messages*." | 185 | "Emit a message into ERT *Messages*." |
| 186 | (tramp--test-instrument-test-case 0 | 186 | (tramp--test-instrument-test-case 0 |
| 187 | (apply | 187 | (apply |
| 188 | 'tramp-message | 188 | #'tramp-message |
| 189 | (tramp-dissect-file-name tramp-test-temporary-file-directory) 0 | 189 | (tramp-dissect-file-name tramp-test-temporary-file-directory) 0 |
| 190 | fmt-string arguments))) | 190 | fmt-string arguments))) |
| 191 | 191 | ||
| @@ -405,7 +405,7 @@ properly. BODY shall not contain a timeout." | |||
| 405 | tramp-default-user-alist | 405 | tramp-default-user-alist |
| 406 | tramp-default-host-alist | 406 | tramp-default-host-alist |
| 407 | ;; Suppress check for multihops. | 407 | ;; Suppress check for multihops. |
| 408 | (tramp-cache-data (make-hash-table :test 'equal)) | 408 | (tramp-cache-data (make-hash-table :test #'equal)) |
| 409 | (tramp-connection-properties '((nil "login-program" t)))) | 409 | (tramp-connection-properties '((nil "login-program" t)))) |
| 410 | ;; Expand `tramp-default-user' and `tramp-default-host'. | 410 | ;; Expand `tramp-default-user' and `tramp-default-host'. |
| 411 | (should (string-equal | 411 | (should (string-equal |
| @@ -844,7 +844,7 @@ properly. BODY shall not contain a timeout." | |||
| 844 | tramp-default-user-alist | 844 | tramp-default-user-alist |
| 845 | tramp-default-host-alist | 845 | tramp-default-host-alist |
| 846 | ;; Suppress check for multihops. | 846 | ;; Suppress check for multihops. |
| 847 | (tramp-cache-data (make-hash-table :test 'equal)) | 847 | (tramp-cache-data (make-hash-table :test #'equal)) |
| 848 | (tramp-connection-properties '((nil "login-program" t))) | 848 | (tramp-connection-properties '((nil "login-program" t))) |
| 849 | (syntax tramp-syntax)) | 849 | (syntax tramp-syntax)) |
| 850 | (unwind-protect | 850 | (unwind-protect |
| @@ -1168,7 +1168,7 @@ properly. BODY shall not contain a timeout." | |||
| 1168 | tramp-default-user-alist | 1168 | tramp-default-user-alist |
| 1169 | tramp-default-host-alist | 1169 | tramp-default-host-alist |
| 1170 | ;; Suppress check for multihops. | 1170 | ;; Suppress check for multihops. |
| 1171 | (tramp-cache-data (make-hash-table :test 'equal)) | 1171 | (tramp-cache-data (make-hash-table :test #'equal)) |
| 1172 | (tramp-connection-properties '((nil "login-program" t))) | 1172 | (tramp-connection-properties '((nil "login-program" t))) |
| 1173 | (syntax tramp-syntax)) | 1173 | (syntax tramp-syntax)) |
| 1174 | (unwind-protect | 1174 | (unwind-protect |
| @@ -2759,7 +2759,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." | |||
| 2759 | (tmp-name4 (expand-file-name "bar" tmp-name2)) | 2759 | (tmp-name4 (expand-file-name "bar" tmp-name2)) |
| 2760 | (tramp-test-temporary-file-directory | 2760 | (tramp-test-temporary-file-directory |
| 2761 | (funcall | 2761 | (funcall |
| 2762 | (if quoted 'tramp-compat-file-name-quote 'identity) | 2762 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 2763 | tramp-test-temporary-file-directory)) | 2763 | tramp-test-temporary-file-directory)) |
| 2764 | buffer) | 2764 | buffer) |
| 2765 | (unwind-protect | 2765 | (unwind-protect |
| @@ -2936,7 +2936,7 @@ This tests also `access-file', `file-readable-p', | |||
| 2936 | (should | 2936 | (should |
| 2937 | (string-equal | 2937 | (string-equal |
| 2938 | (funcall | 2938 | (funcall |
| 2939 | (if quoted 'tramp-compat-file-name-quote 'identity) | 2939 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 2940 | (car attr)) | 2940 | (car attr)) |
| 2941 | (file-remote-p (file-truename tmp-name1) 'localname))) | 2941 | (file-remote-p (file-truename tmp-name1) 'localname))) |
| 2942 | (delete-file tmp-name2)) | 2942 | (delete-file tmp-name2)) |
| @@ -3028,7 +3028,7 @@ They might differ only in access time." | |||
| 3028 | (tramp--test-file-attributes-equal-p | 3028 | (tramp--test-file-attributes-equal-p |
| 3029 | (file-attributes (car elt)) (cdr elt))))) | 3029 | (file-attributes (car elt)) (cdr elt))))) |
| 3030 | (setq attr (directory-files-and-attributes tmp-name2 nil "^b")) | 3030 | (setq attr (directory-files-and-attributes tmp-name2 nil "^b")) |
| 3031 | (should (equal (mapcar 'car attr) '("bar" "boz")))) | 3031 | (should (equal (mapcar #'car attr) '("bar" "boz")))) |
| 3032 | 3032 | ||
| 3033 | ;; Cleanup. | 3033 | ;; Cleanup. |
| 3034 | (ignore-errors (delete-directory tmp-name1 'recursive)))))) | 3034 | (ignore-errors (delete-directory tmp-name1 'recursive)))))) |
| @@ -3100,7 +3100,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3100 | (should | 3100 | (should |
| 3101 | (string-equal | 3101 | (string-equal |
| 3102 | (funcall | 3102 | (funcall |
| 3103 | (if quoted 'tramp-compat-file-name-unquote 'identity) | 3103 | (if quoted #'tramp-compat-file-name-unquote #'identity) |
| 3104 | (file-remote-p tmp-name1 'localname)) | 3104 | (file-remote-p tmp-name1 'localname)) |
| 3105 | (file-symlink-p tmp-name2))) | 3105 | (file-symlink-p tmp-name2))) |
| 3106 | (when (tramp--test-expensive-test) | 3106 | (when (tramp--test-expensive-test) |
| @@ -3109,7 +3109,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3109 | :type 'file-already-exists)) | 3109 | :type 'file-already-exists)) |
| 3110 | (when (tramp--test-expensive-test) | 3110 | (when (tramp--test-expensive-test) |
| 3111 | ;; A number means interactive case. | 3111 | ;; A number means interactive case. |
| 3112 | (cl-letf (((symbol-function 'yes-or-no-p) 'ignore)) | 3112 | (cl-letf (((symbol-function 'yes-or-no-p) #'ignore)) |
| 3113 | (should-error | 3113 | (should-error |
| 3114 | (make-symbolic-link tmp-name1 tmp-name2 0) | 3114 | (make-symbolic-link tmp-name1 tmp-name2 0) |
| 3115 | :type 'file-already-exists))) | 3115 | :type 'file-already-exists))) |
| @@ -3118,14 +3118,14 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3118 | (should | 3118 | (should |
| 3119 | (string-equal | 3119 | (string-equal |
| 3120 | (funcall | 3120 | (funcall |
| 3121 | (if quoted 'tramp-compat-file-name-unquote 'identity) | 3121 | (if quoted #'tramp-compat-file-name-unquote #'identity) |
| 3122 | (file-remote-p tmp-name1 'localname)) | 3122 | (file-remote-p tmp-name1 'localname)) |
| 3123 | (file-symlink-p tmp-name2)))) | 3123 | (file-symlink-p tmp-name2)))) |
| 3124 | (make-symbolic-link tmp-name1 tmp-name2 'ok-if-already-exists) | 3124 | (make-symbolic-link tmp-name1 tmp-name2 'ok-if-already-exists) |
| 3125 | (should | 3125 | (should |
| 3126 | (string-equal | 3126 | (string-equal |
| 3127 | (funcall | 3127 | (funcall |
| 3128 | (if quoted 'tramp-compat-file-name-unquote 'identity) | 3128 | (if quoted #'tramp-compat-file-name-unquote #'identity) |
| 3129 | (file-remote-p tmp-name1 'localname)) | 3129 | (file-remote-p tmp-name1 'localname)) |
| 3130 | (file-symlink-p tmp-name2))) | 3130 | (file-symlink-p tmp-name2))) |
| 3131 | ;; If we use the local part of `tmp-name1', it shall still work. | 3131 | ;; If we use the local part of `tmp-name1', it shall still work. |
| @@ -3135,7 +3135,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3135 | (should | 3135 | (should |
| 3136 | (string-equal | 3136 | (string-equal |
| 3137 | (funcall | 3137 | (funcall |
| 3138 | (if quoted 'tramp-compat-file-name-unquote 'identity) | 3138 | (if quoted #'tramp-compat-file-name-unquote #'identity) |
| 3139 | (file-remote-p tmp-name1 'localname)) | 3139 | (file-remote-p tmp-name1 'localname)) |
| 3140 | (file-symlink-p tmp-name2))) | 3140 | (file-symlink-p tmp-name2))) |
| 3141 | ;; `tmp-name3' is a local file name. Therefore, the link | 3141 | ;; `tmp-name3' is a local file name. Therefore, the link |
| @@ -3155,7 +3155,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3155 | (should | 3155 | (should |
| 3156 | (string-equal | 3156 | (string-equal |
| 3157 | (funcall | 3157 | (funcall |
| 3158 | (if quoted 'tramp-compat-file-name-unquote 'identity) | 3158 | (if quoted #'tramp-compat-file-name-unquote #'identity) |
| 3159 | (file-remote-p tmp-name1 'localname)) | 3159 | (file-remote-p tmp-name1 'localname)) |
| 3160 | (file-symlink-p tmp-name5))) | 3160 | (file-symlink-p tmp-name5))) |
| 3161 | ;; `smbclient' does not show symlinks in directories, so | 3161 | ;; `smbclient' does not show symlinks in directories, so |
| @@ -3182,7 +3182,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3182 | (add-name-to-file tmp-name1 tmp-name2) | 3182 | (add-name-to-file tmp-name1 tmp-name2) |
| 3183 | :type 'file-already-exists) | 3183 | :type 'file-already-exists) |
| 3184 | ;; A number means interactive case. | 3184 | ;; A number means interactive case. |
| 3185 | (cl-letf (((symbol-function 'yes-or-no-p) 'ignore)) | 3185 | (cl-letf (((symbol-function 'yes-or-no-p) #'ignore)) |
| 3186 | (should-error | 3186 | (should-error |
| 3187 | (add-name-to-file tmp-name1 tmp-name2 0) | 3187 | (add-name-to-file tmp-name1 tmp-name2 0) |
| 3188 | :type 'file-already-exists)) | 3188 | :type 'file-already-exists)) |
| @@ -3239,7 +3239,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3239 | (delete-file tmp-name2) | 3239 | (delete-file tmp-name2) |
| 3240 | (make-symbolic-link | 3240 | (make-symbolic-link |
| 3241 | (funcall | 3241 | (funcall |
| 3242 | (if quoted 'tramp-compat-file-name-unquote 'identity) | 3242 | (if quoted #'tramp-compat-file-name-unquote #'identity) |
| 3243 | "/penguin:motd:") | 3243 | "/penguin:motd:") |
| 3244 | tmp-name2) | 3244 | tmp-name2) |
| 3245 | (should (file-symlink-p tmp-name2)) | 3245 | (should (file-symlink-p tmp-name2)) |
| @@ -3328,7 +3328,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3328 | (let* ((dir1 | 3328 | (let* ((dir1 |
| 3329 | (directory-file-name | 3329 | (directory-file-name |
| 3330 | (funcall | 3330 | (funcall |
| 3331 | (if quoted 'tramp-compat-file-name-quote 'identity) | 3331 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 3332 | tramp-test-temporary-file-directory))) | 3332 | tramp-test-temporary-file-directory))) |
| 3333 | (dir2 (file-name-as-directory dir1))) | 3333 | (dir2 (file-name-as-directory dir1))) |
| 3334 | (should (string-equal (file-truename dir1) (expand-file-name dir1))) | 3334 | (should (string-equal (file-truename dir1) (expand-file-name dir1))) |
| @@ -3708,12 +3708,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3708 | (should-not (file-name-completion "a" tmp-name)) | 3708 | (should-not (file-name-completion "a" tmp-name)) |
| 3709 | (should | 3709 | (should |
| 3710 | (equal | 3710 | (equal |
| 3711 | (file-name-completion "b" tmp-name 'file-directory-p) "boz/")) | 3711 | (file-name-completion "b" tmp-name #'file-directory-p) "boz/")) |
| 3712 | (should | 3712 | (should |
| 3713 | (equal (file-name-all-completions "fo" tmp-name) '("foo"))) | 3713 | (equal (file-name-all-completions "fo" tmp-name) '("foo"))) |
| 3714 | (should | 3714 | (should |
| 3715 | (equal | 3715 | (equal |
| 3716 | (sort (file-name-all-completions "b" tmp-name) 'string-lessp) | 3716 | (sort (file-name-all-completions "b" tmp-name) #'string-lessp) |
| 3717 | '("bold" "boz/"))) | 3717 | '("bold" "boz/"))) |
| 3718 | (should-not (file-name-all-completions "a" tmp-name)) | 3718 | (should-not (file-name-all-completions "a" tmp-name)) |
| 3719 | ;; `completion-regexp-list' restricts the completion to | 3719 | ;; `completion-regexp-list' restricts the completion to |
| @@ -3724,7 +3724,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3724 | (equal (file-name-completion "" tmp-name) "bo")) | 3724 | (equal (file-name-completion "" tmp-name) "bo")) |
| 3725 | (should | 3725 | (should |
| 3726 | (equal | 3726 | (equal |
| 3727 | (sort (file-name-all-completions "" tmp-name) 'string-lessp) | 3727 | (sort (file-name-all-completions "" tmp-name) #'string-lessp) |
| 3728 | '("bold" "boz/")))) | 3728 | '("bold" "boz/")))) |
| 3729 | ;; `file-name-completion' ignores file names that end in | 3729 | ;; `file-name-completion' ignores file names that end in |
| 3730 | ;; any string in `completion-ignored-extensions'. | 3730 | ;; any string in `completion-ignored-extensions'. |
| @@ -3739,7 +3739,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3739 | ;; `file-name-all-completions' is not affected. | 3739 | ;; `file-name-all-completions' is not affected. |
| 3740 | (should | 3740 | (should |
| 3741 | (equal | 3741 | (equal |
| 3742 | (sort (file-name-all-completions "" tmp-name) 'string-lessp) | 3742 | (sort (file-name-all-completions "" tmp-name) #'string-lessp) |
| 3743 | '("../" "./" "bold" "boz/" "foo" "foo.ext"))))) | 3743 | '("../" "./" "bold" "boz/" "foo" "foo.ext"))))) |
| 3744 | 3744 | ||
| 3745 | ;; Cleanup. | 3745 | ;; Cleanup. |
| @@ -4288,7 +4288,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4288 | (with-current-buffer (get-buffer-create "*shell*") | 4288 | (with-current-buffer (get-buffer-create "*shell*") |
| 4289 | (ignore-errors (kill-process (current-buffer))) | 4289 | (ignore-errors (kill-process (current-buffer))) |
| 4290 | (should-not explicit-shell-file-name) | 4290 | (should-not explicit-shell-file-name) |
| 4291 | (call-interactively 'shell) | 4291 | (call-interactively #'shell) |
| 4292 | (should explicit-shell-file-name))) | 4292 | (should explicit-shell-file-name))) |
| 4293 | 4293 | ||
| 4294 | (put 'explicit-shell-file-name 'permanent-local nil) | 4294 | (put 'explicit-shell-file-name 'permanent-local nil) |
| @@ -4315,7 +4315,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4315 | (car (last (with-no-warnings (exec-path)))) | 4315 | (car (last (with-no-warnings (exec-path)))) |
| 4316 | (file-remote-p default-directory 'localname))) | 4316 | (file-remote-p default-directory 'localname))) |
| 4317 | ;; The shell "sh" shall always exist. | 4317 | ;; The shell "sh" shall always exist. |
| 4318 | (should (apply 'executable-find '("sh" remote))) | 4318 | (should (apply #'executable-find '("sh" remote))) |
| 4319 | ;; Since the last element in `exec-path' is the current | 4319 | ;; Since the last element in `exec-path' is the current |
| 4320 | ;; directory, an executable file in that directory will be | 4320 | ;; directory, an executable file in that directory will be |
| 4321 | ;; found. | 4321 | ;; found. |
| @@ -4326,11 +4326,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4326 | (should | 4326 | (should |
| 4327 | (string-equal | 4327 | (string-equal |
| 4328 | (apply | 4328 | (apply |
| 4329 | 'executable-find `(,(file-name-nondirectory tmp-name) remote)) | 4329 | #'executable-find `(,(file-name-nondirectory tmp-name) remote)) |
| 4330 | (file-remote-p tmp-name 'localname))) | 4330 | (file-remote-p tmp-name 'localname))) |
| 4331 | (should-not | 4331 | (should-not |
| 4332 | (apply | 4332 | (apply |
| 4333 | 'executable-find | 4333 | #'executable-find |
| 4334 | `(,(concat (file-name-nondirectory tmp-name) "foo") remote)))) | 4334 | `(,(concat (file-name-nondirectory tmp-name) "foo") remote)))) |
| 4335 | 4335 | ||
| 4336 | ;; Cleanup. | 4336 | ;; Cleanup. |
| @@ -4375,7 +4375,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4375 | ;; We make a super long `tramp-remote-path'. | 4375 | ;; We make a super long `tramp-remote-path'. |
| 4376 | (make-directory tmp-name) | 4376 | (make-directory tmp-name) |
| 4377 | (should (file-directory-p tmp-name)) | 4377 | (should (file-directory-p tmp-name)) |
| 4378 | (while (< (length (mapconcat 'identity orig-exec-path ":")) 5000) | 4378 | (while (< (length (mapconcat #'identity orig-exec-path ":")) 5000) |
| 4379 | (let ((dir (make-temp-file (file-name-as-directory tmp-name) 'dir))) | 4379 | (let ((dir (make-temp-file (file-name-as-directory tmp-name) 'dir))) |
| 4380 | (should (file-directory-p dir)) | 4380 | (should (file-directory-p dir)) |
| 4381 | (setq tramp-remote-path | 4381 | (setq tramp-remote-path |
| @@ -4391,9 +4391,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4391 | ;; Ignore trailing newline. | 4391 | ;; Ignore trailing newline. |
| 4392 | (substring (shell-command-to-string "echo $PATH") nil -1) | 4392 | (substring (shell-command-to-string "echo $PATH") nil -1) |
| 4393 | ;; The last element of `exec-path' is `exec-directory'. | 4393 | ;; The last element of `exec-path' is `exec-directory'. |
| 4394 | (mapconcat 'identity (butlast orig-exec-path) ":"))) | 4394 | (mapconcat #'identity (butlast orig-exec-path) ":"))) |
| 4395 | ;; The shell "sh" shall always exist. | 4395 | ;; The shell "sh" shall always exist. |
| 4396 | (should (apply 'executable-find '("sh" remote)))) | 4396 | (should (apply #'executable-find '("sh" remote)))) |
| 4397 | 4397 | ||
| 4398 | ;; Cleanup. | 4398 | ;; Cleanup. |
| 4399 | (tramp-cleanup-connection | 4399 | (tramp-cleanup-connection |
| @@ -4509,7 +4509,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4509 | (string-equal | 4509 | (string-equal |
| 4510 | (make-auto-save-file-name) | 4510 | (make-auto-save-file-name) |
| 4511 | (funcall | 4511 | (funcall |
| 4512 | (if quoted 'tramp-compat-file-name-quote 'identity) | 4512 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 4513 | (expand-file-name | 4513 | (expand-file-name |
| 4514 | (format "#%s#" (file-name-nondirectory tmp-name1)) | 4514 | (format "#%s#" (file-name-nondirectory tmp-name1)) |
| 4515 | tramp-test-temporary-file-directory)))))) | 4515 | tramp-test-temporary-file-directory)))))) |
| @@ -4583,7 +4583,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4583 | (find-backup-file-name tmp-name1) | 4583 | (find-backup-file-name tmp-name1) |
| 4584 | (list | 4584 | (list |
| 4585 | (funcall | 4585 | (funcall |
| 4586 | (if quoted 'tramp-compat-file-name-quote 'identity) | 4586 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 4587 | (expand-file-name | 4587 | (expand-file-name |
| 4588 | (format "%s~" (file-name-nondirectory tmp-name1)) | 4588 | (format "%s~" (file-name-nondirectory tmp-name1)) |
| 4589 | tramp-test-temporary-file-directory))))))) | 4589 | tramp-test-temporary-file-directory))))))) |
| @@ -4597,7 +4597,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4597 | (find-backup-file-name tmp-name1) | 4597 | (find-backup-file-name tmp-name1) |
| 4598 | (list | 4598 | (list |
| 4599 | (funcall | 4599 | (funcall |
| 4600 | (if quoted 'tramp-compat-file-name-quote 'identity) | 4600 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 4601 | (expand-file-name | 4601 | (expand-file-name |
| 4602 | (format | 4602 | (format |
| 4603 | "%s~" | 4603 | "%s~" |
| @@ -4625,7 +4625,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4625 | (find-backup-file-name tmp-name1) | 4625 | (find-backup-file-name tmp-name1) |
| 4626 | (list | 4626 | (list |
| 4627 | (funcall | 4627 | (funcall |
| 4628 | (if quoted 'tramp-compat-file-name-quote 'identity) | 4628 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 4629 | (expand-file-name | 4629 | (expand-file-name |
| 4630 | (format | 4630 | (format |
| 4631 | "%s~" | 4631 | "%s~" |
| @@ -4654,7 +4654,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4654 | (find-backup-file-name tmp-name1) | 4654 | (find-backup-file-name tmp-name1) |
| 4655 | (list | 4655 | (list |
| 4656 | (funcall | 4656 | (funcall |
| 4657 | (if quoted 'tramp-compat-file-name-quote 'identity) | 4657 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 4658 | (expand-file-name | 4658 | (expand-file-name |
| 4659 | (format | 4659 | (format |
| 4660 | "%s~" | 4660 | "%s~" |
| @@ -4863,7 +4863,7 @@ This requires restrictions of file name syntax." | |||
| 4863 | (should | 4863 | (should |
| 4864 | (string-equal | 4864 | (string-equal |
| 4865 | (funcall | 4865 | (funcall |
| 4866 | (if quoted 'tramp-compat-file-name-quote 'identity) | 4866 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 4867 | (car (file-attributes file3))) | 4867 | (car (file-attributes file3))) |
| 4868 | (file-remote-p (file-truename file1) 'localname))) | 4868 | (file-remote-p (file-truename file1) 'localname))) |
| 4869 | ;; Check file contents. | 4869 | ;; Check file contents. |
| @@ -4875,10 +4875,10 @@ This requires restrictions of file name syntax." | |||
| 4875 | ;; Check file names. | 4875 | ;; Check file names. |
| 4876 | (should (equal (directory-files | 4876 | (should (equal (directory-files |
| 4877 | tmp-name1 nil directory-files-no-dot-files-regexp) | 4877 | tmp-name1 nil directory-files-no-dot-files-regexp) |
| 4878 | (sort (copy-sequence files) 'string-lessp))) | 4878 | (sort (copy-sequence files) #'string-lessp))) |
| 4879 | (should (equal (directory-files | 4879 | (should (equal (directory-files |
| 4880 | tmp-name2 nil directory-files-no-dot-files-regexp) | 4880 | tmp-name2 nil directory-files-no-dot-files-regexp) |
| 4881 | (sort (copy-sequence files) 'string-lessp))) | 4881 | (sort (copy-sequence files) #'string-lessp))) |
| 4882 | 4882 | ||
| 4883 | ;; `substitute-in-file-name' could return different | 4883 | ;; `substitute-in-file-name' could return different |
| 4884 | ;; values. For `adb', there could be strange file | 4884 | ;; values. For `adb', there could be strange file |
| @@ -4938,7 +4938,7 @@ This requires restrictions of file name syntax." | |||
| 4938 | (should | 4938 | (should |
| 4939 | (string-equal | 4939 | (string-equal |
| 4940 | (funcall | 4940 | (funcall |
| 4941 | (if quoted 'tramp-compat-file-name-quote 'identity) | 4941 | (if quoted #'tramp-compat-file-name-quote #'identity) |
| 4942 | (cadr (car (directory-files-and-attributes | 4942 | (cadr (car (directory-files-and-attributes |
| 4943 | file1 nil (regexp-quote elt1))))) | 4943 | file1 nil (regexp-quote elt1))))) |
| 4944 | (file-remote-p (file-truename file2) 'localname))) | 4944 | (file-remote-p (file-truename file2) 'localname))) |
| @@ -5024,9 +5024,9 @@ This requires restrictions of file name syntax." | |||
| 5024 | (unless (or (tramp--test-ftp-p) (tramp--test-gvfs-p)) "[foo]bar[baz]") | 5024 | (unless (or (tramp--test-ftp-p) (tramp--test-gvfs-p)) "[foo]bar[baz]") |
| 5025 | "{foo}bar{baz}"))) | 5025 | "{foo}bar{baz}"))) |
| 5026 | ;; Simplify test in order to speed up. | 5026 | ;; Simplify test in order to speed up. |
| 5027 | (apply 'tramp--test-check-files | 5027 | (apply #'tramp--test-check-files |
| 5028 | (if (tramp--test-expensive-test) | 5028 | (if (tramp--test-expensive-test) |
| 5029 | files (list (mapconcat 'identity files "")))))) | 5029 | files (list (mapconcat #'identity files "")))))) |
| 5030 | 5030 | ||
| 5031 | ;; These tests are inspired by Bug#17238. | 5031 | ;; These tests are inspired by Bug#17238. |
| 5032 | (ert-deftest tramp-test40-special-characters () | 5032 | (ert-deftest tramp-test40-special-characters () |
| @@ -5108,7 +5108,7 @@ Use the `ls' command." | |||
| 5108 | (file-name-coding-system | 5108 | (file-name-coding-system |
| 5109 | (coding-system-change-eol-conversion utf8 'unix))) | 5109 | (coding-system-change-eol-conversion utf8 'unix))) |
| 5110 | (apply | 5110 | (apply |
| 5111 | 'tramp--test-check-files | 5111 | #'tramp--test-check-files |
| 5112 | (append | 5112 | (append |
| 5113 | (list | 5113 | (list |
| 5114 | (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") | 5114 | (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") |
| @@ -5252,7 +5252,7 @@ process sentinels. They shall not disturb each other." | |||
| 5252 | 5252 | ||
| 5253 | (with-timeout | 5253 | (with-timeout |
| 5254 | (tramp--test-asynchronous-requests-timeout (tramp--test-timeout-handler)) | 5254 | (tramp--test-asynchronous-requests-timeout (tramp--test-timeout-handler)) |
| 5255 | (define-key special-event-map [sigusr1] 'tramp--test-timeout-handler) | 5255 | (define-key special-event-map [sigusr1] #'tramp--test-timeout-handler) |
| 5256 | (let* (;; For the watchdog. | 5256 | (let* (;; For the watchdog. |
| 5257 | (default-directory (expand-file-name temporary-file-directory)) | 5257 | (default-directory (expand-file-name temporary-file-directory)) |
| 5258 | (shell-file-name "/bin/sh") | 5258 | (shell-file-name "/bin/sh") |
| @@ -5287,8 +5287,8 @@ process sentinels. They shall not disturb each other." | |||
| 5287 | ;; We must distinguish due to performance reasons. | 5287 | ;; We must distinguish due to performance reasons. |
| 5288 | (timer-operation | 5288 | (timer-operation |
| 5289 | (cond | 5289 | (cond |
| 5290 | ((tramp--test-mock-p) 'vc-registered) | 5290 | ((tramp--test-mock-p) #'vc-registered) |
| 5291 | (t 'file-attributes))) | 5291 | (t #'file-attributes))) |
| 5292 | ;; This is when all timers start. We check inside the | 5292 | ;; This is when all timers start. We check inside the |
| 5293 | ;; timer function, that we don't exceed timeout. | 5293 | ;; timer function, that we don't exceed timeout. |
| 5294 | (timer-start (current-time)) | 5294 | (timer-start (current-time)) |
| @@ -5414,7 +5414,7 @@ process sentinels. They shall not disturb each other." | |||
| 5414 | tmp-name nil directory-files-no-dot-files-regexp))) | 5414 | tmp-name nil directory-files-no-dot-files-regexp))) |
| 5415 | 5415 | ||
| 5416 | ;; Cleanup. | 5416 | ;; Cleanup. |
| 5417 | (define-key special-event-map [sigusr1] 'ignore) | 5417 | (define-key special-event-map [sigusr1] #'ignore) |
| 5418 | (ignore-errors (quit-process watchdog)) | 5418 | (ignore-errors (quit-process watchdog)) |
| 5419 | (dolist (buf buffers) | 5419 | (dolist (buf buffers) |
| 5420 | (ignore-errors (delete-process (get-buffer-process buf))) | 5420 | (ignore-errors (delete-process (get-buffer-process buf))) |
| @@ -5440,7 +5440,7 @@ process sentinels. They shall not disturb each other." | |||
| 5440 | "%s -batch -Q -L %s --eval %s" | 5440 | "%s -batch -Q -L %s --eval %s" |
| 5441 | (shell-quote-argument | 5441 | (shell-quote-argument |
| 5442 | (expand-file-name invocation-name invocation-directory)) | 5442 | (expand-file-name invocation-name invocation-directory)) |
| 5443 | (mapconcat 'shell-quote-argument load-path " -L ") | 5443 | (mapconcat #'shell-quote-argument load-path " -L ") |
| 5444 | (shell-quote-argument code))))))) | 5444 | (shell-quote-argument code))))))) |
| 5445 | 5445 | ||
| 5446 | (ert-deftest tramp-test44-delay-load () | 5446 | (ert-deftest tramp-test44-delay-load () |
| @@ -5473,7 +5473,7 @@ process sentinels. They shall not disturb each other." | |||
| 5473 | "%s -batch -Q -L %s --eval %s" | 5473 | "%s -batch -Q -L %s --eval %s" |
| 5474 | (shell-quote-argument | 5474 | (shell-quote-argument |
| 5475 | (expand-file-name invocation-name invocation-directory)) | 5475 | (expand-file-name invocation-name invocation-directory)) |
| 5476 | (mapconcat 'shell-quote-argument load-path " -L ") | 5476 | (mapconcat #'shell-quote-argument load-path " -L ") |
| 5477 | (shell-quote-argument (format code tm))))))))) | 5477 | (shell-quote-argument (format code tm))))))))) |
| 5478 | 5478 | ||
| 5479 | (ert-deftest tramp-test44-recursive-load () | 5479 | (ert-deftest tramp-test44-recursive-load () |
| @@ -5497,7 +5497,7 @@ process sentinels. They shall not disturb each other." | |||
| 5497 | "%s -batch -Q -L %s --eval %s" | 5497 | "%s -batch -Q -L %s --eval %s" |
| 5498 | (shell-quote-argument | 5498 | (shell-quote-argument |
| 5499 | (expand-file-name invocation-name invocation-directory)) | 5499 | (expand-file-name invocation-name invocation-directory)) |
| 5500 | (mapconcat 'shell-quote-argument load-path " -L ") | 5500 | (mapconcat #'shell-quote-argument load-path " -L ") |
| 5501 | (shell-quote-argument code)))))))) | 5501 | (shell-quote-argument code)))))))) |
| 5502 | 5502 | ||
| 5503 | (ert-deftest tramp-test44-remote-load-path () | 5503 | (ert-deftest tramp-test44-remote-load-path () |
| @@ -5526,7 +5526,7 @@ process sentinels. They shall not disturb each other." | |||
| 5526 | "%s -batch -Q -L %s -l tramp-sh --eval %s" | 5526 | "%s -batch -Q -L %s -l tramp-sh --eval %s" |
| 5527 | (shell-quote-argument | 5527 | (shell-quote-argument |
| 5528 | (expand-file-name invocation-name invocation-directory)) | 5528 | (expand-file-name invocation-name invocation-directory)) |
| 5529 | (mapconcat 'shell-quote-argument load-path " -L ") | 5529 | (mapconcat #'shell-quote-argument load-path " -L ") |
| 5530 | (shell-quote-argument code))))))) | 5530 | (shell-quote-argument code))))))) |
| 5531 | 5531 | ||
| 5532 | (ert-deftest tramp-test45-unload () | 5532 | (ert-deftest tramp-test45-unload () |
| @@ -5554,7 +5554,7 @@ Since it unloads Tramp, it shall be the last test to run." | |||
| 5554 | (all-completions | 5554 | (all-completions |
| 5555 | "tramp" (delq 'tramp-tests (delq 'tramp-archive-tests features)))) | 5555 | "tramp" (delq 'tramp-tests (delq 'tramp-archive-tests features)))) |
| 5556 | ;; `file-name-handler-alist' must be clean. | 5556 | ;; `file-name-handler-alist' must be clean. |
| 5557 | (should-not (all-completions "tramp" (mapcar 'cdr file-name-handler-alist))) | 5557 | (should-not (all-completions "tramp" (mapcar #'cdr file-name-handler-alist))) |
| 5558 | ;; There shouldn't be left a bound symbol, except buffer-local | 5558 | ;; There shouldn't be left a bound symbol, except buffer-local |
| 5559 | ;; variables, and autoload functions. We do not regard our test | 5559 | ;; variables, and autoload functions. We do not regard our test |
| 5560 | ;; symbols, and the Tramp unload hooks. | 5560 | ;; symbols, and the Tramp unload hooks. |
| @@ -5589,7 +5589,8 @@ Since it unloads Tramp, it shall be the last test to run." | |||
| 5589 | "Run all tests for \\[tramp]." | 5589 | "Run all tests for \\[tramp]." |
| 5590 | (interactive "p") | 5590 | (interactive "p") |
| 5591 | (funcall | 5591 | (funcall |
| 5592 | (if interactive 'ert-run-tests-interactively 'ert-run-tests-batch) "^tramp")) | 5592 | (if interactive |
| 5593 | #'ert-run-tests-interactively #'ert-run-tests-batch) "^tramp")) | ||
| 5593 | 5594 | ||
| 5594 | ;; TODO: | 5595 | ;; TODO: |
| 5595 | 5596 | ||