Sync with Tramp 2.2.12
* doc/misc/trampver.texi: * lisp/net/trampver.el: Update release number. * test/automated/tramp-tests.el (tramp-test13-make-directory): Fix cleanup.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
@c In the Tramp GIT, the version number is auto-frobbed from
|
||||
@c configure.ac, so you should edit that file and run
|
||||
@c "autoconf && ./configure" to change the version number.
|
||||
@set trampver 2.2.12-pre
|
||||
@set trampver 2.2.12
|
||||
|
||||
@c Other flags from configuration
|
||||
@set instprefix /usr/local
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
;; should be changed only there.
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defconst tramp-version "2.2.12-pre"
|
||||
(defconst tramp-version "2.2.12"
|
||||
"This version of Tramp.")
|
||||
|
||||
;;;###tramp-autoload
|
||||
@@ -58,7 +58,7 @@
|
||||
(= emacs-major-version 21)
|
||||
(>= emacs-minor-version 4)))
|
||||
"ok"
|
||||
(format "Tramp 2.2.12-pre is not fit for %s"
|
||||
(format "Tramp 2.2.12 is not fit for %s"
|
||||
(when (string-match "^.*$" (emacs-version))
|
||||
(match-string 0 (emacs-version)))))))
|
||||
(unless (string-match "\\`ok\\'" x) (error "%s" x)))
|
||||
|
||||
@@ -622,6 +622,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
(tramp-inline-compress-start-size 2))
|
||||
(delete-file tmp-name2)
|
||||
(should (setq tmp-name2 (file-local-copy tmp-name1)))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors
|
||||
(delete-file tmp-name1)
|
||||
(delete-file tmp-name2)))))
|
||||
@@ -645,6 +647,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
;; Replace.
|
||||
(insert-file-contents tmp-name nil nil nil 'replace)
|
||||
(should (string-equal (buffer-string) "foo"))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name)))))
|
||||
|
||||
(ert-deftest tramp-test10-write-region ()
|
||||
@@ -679,6 +683,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
(with-temp-buffer
|
||||
(insert-file-contents tmp-name)
|
||||
(should (string-equal (buffer-string) "34"))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name)))))
|
||||
|
||||
(ert-deftest tramp-test11-copy-file ()
|
||||
@@ -707,6 +713,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
(should
|
||||
(file-exists-p
|
||||
(expand-file-name (file-name-nondirectory tmp-name1) tmp-name3))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name1))
|
||||
(ignore-errors (delete-file tmp-name2))
|
||||
(ignore-errors (delete-directory tmp-name3 'recursive)))
|
||||
@@ -727,6 +735,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
(should
|
||||
(file-exists-p
|
||||
(expand-file-name (file-name-nondirectory tmp-name1) tmp-name5))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name1))
|
||||
(ignore-errors (delete-file tmp-name4))
|
||||
(ignore-errors (delete-directory tmp-name5 'recursive)))
|
||||
@@ -747,6 +757,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
(should
|
||||
(file-exists-p
|
||||
(expand-file-name (file-name-nondirectory tmp-name4) tmp-name3))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name1))
|
||||
(ignore-errors (delete-file tmp-name4))
|
||||
(ignore-errors (delete-directory tmp-name3 'recursive)))))
|
||||
@@ -782,6 +794,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
(should
|
||||
(file-exists-p
|
||||
(expand-file-name (file-name-nondirectory tmp-name1) tmp-name3))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name1))
|
||||
(ignore-errors (delete-file tmp-name2))
|
||||
(ignore-errors (delete-directory tmp-name3 'recursive)))
|
||||
@@ -807,6 +821,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
(should
|
||||
(file-exists-p
|
||||
(expand-file-name (file-name-nondirectory tmp-name1) tmp-name5))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name1))
|
||||
(ignore-errors (delete-file tmp-name4))
|
||||
(ignore-errors (delete-directory tmp-name5 'recursive)))
|
||||
@@ -832,6 +848,8 @@ This checks also `file-name-as-directory', `file-name-directory',
|
||||
(should
|
||||
(file-exists-p
|
||||
(expand-file-name (file-name-nondirectory tmp-name4) tmp-name3))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name1))
|
||||
(ignore-errors (delete-file tmp-name4))
|
||||
(ignore-errors (delete-directory tmp-name3 'recursive)))))
|
||||
@@ -854,7 +872,9 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
|
||||
(should (file-directory-p (expand-file-name "foo/bar" tmp-name)))
|
||||
(should
|
||||
(file-accessible-directory-p (expand-file-name "foo/bar" tmp-name))))
|
||||
(ignore-errors (delete-directory tmp-name)))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-directory tmp-name 'recursive)))))
|
||||
|
||||
(ert-deftest tramp-test14-delete-directory ()
|
||||
"Check `delete-directory'."
|
||||
@@ -903,6 +923,8 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
|
||||
(copy-directory tmp-name1 tmp-name2)
|
||||
(should (file-directory-p tmp-name3))
|
||||
(should (file-exists-p tmp-name6)))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors
|
||||
(delete-directory tmp-name1 'recursive)
|
||||
(delete-directory tmp-name2 'recursive)))))
|
||||
@@ -933,6 +955,8 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
|
||||
(should (equal (directory-files
|
||||
tmp-name1 'full directory-files-no-dot-files-regexp)
|
||||
`(,tmp-name2 ,tmp-name3))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-directory tmp-name1 'recursive)))))
|
||||
|
||||
(ert-deftest tramp-test17-insert-directory ()
|
||||
@@ -974,6 +998,8 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
|
||||
"\\(total.+[[:digit:]]+\n\\)?"
|
||||
;; We don't know in which order ".", ".." and "foo" appear.
|
||||
"\\(.+ \\(\\.?\\.\\|foo\\)\n\\)\\{3\\}")))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-directory tmp-name1 'recursive)))))
|
||||
|
||||
(ert-deftest tramp-test18-file-attributes ()
|
||||
@@ -1038,6 +1064,7 @@ This tests also `file-readable-p' and `file-regular-p'."
|
||||
(setq attr (file-attributes tmp-name1))
|
||||
(should (eq (car attr) t)))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-directory tmp-name1)))))
|
||||
|
||||
(ert-deftest tramp-test19-directory-files-and-attributes ()
|
||||
@@ -1079,6 +1106,8 @@ This tests also `file-readable-p' and `file-regular-p'."
|
||||
(equal (file-attributes (car elt)) (cdr elt)))))
|
||||
(setq attr (directory-files-and-attributes tmp-name2 nil "^b"))
|
||||
(should (equal (mapcar 'car attr) '("bar" "boz"))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-directory tmp-name1 'recursive)))))
|
||||
|
||||
(ert-deftest tramp-test20-file-modes ()
|
||||
@@ -1108,6 +1137,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
|
||||
;; A file is always writable for user "root".
|
||||
(unless (zerop (nth 2 (file-attributes tmp-name)))
|
||||
(should-not (file-writable-p tmp-name))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name)))))
|
||||
|
||||
(ert-deftest tramp-test21-file-links ()
|
||||
@@ -1142,6 +1173,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(should (file-symlink-p tmp-name2))
|
||||
;; `tmp-name3' is a local file name.
|
||||
(should-error (make-symbolic-link tmp-name1 tmp-name3)))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors
|
||||
(delete-file tmp-name1)
|
||||
(delete-file tmp-name2)))
|
||||
@@ -1157,6 +1190,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(should-not (file-symlink-p tmp-name2))
|
||||
;; `tmp-name3' is a local file name.
|
||||
(should-error (add-name-to-file tmp-name1 tmp-name3)))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors
|
||||
(delete-file tmp-name1)
|
||||
(delete-file tmp-name2)))
|
||||
@@ -1214,6 +1249,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
;; `tmp-name3' does not exist.
|
||||
(should (file-newer-than-file-p tmp-name2 tmp-name3))
|
||||
(should-not (file-newer-than-file-p tmp-name3 tmp-name1))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors
|
||||
(delete-file tmp-name1)
|
||||
(delete-file tmp-name2)))))
|
||||
@@ -1233,6 +1270,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(set-visited-file-modtime '(0 1))
|
||||
(should (verify-visited-file-modtime))
|
||||
(should (equal (visited-file-modtime) '(0 1 0 0)))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name)))))
|
||||
|
||||
(ert-deftest tramp-test24-file-name-completion ()
|
||||
@@ -1255,6 +1294,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(should
|
||||
(equal (sort (file-name-all-completions "b" tmp-name) 'string-lessp)
|
||||
'("bold" "boz/"))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-directory tmp-name 'recursive)))))
|
||||
|
||||
(ert-deftest tramp-test25-load ()
|
||||
@@ -1271,6 +1312,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
;(should-error (load tmp-name nil 'nomessage 'nosuffix 'must-suffix))
|
||||
(load tmp-name nil 'nomessage 'nosuffix)
|
||||
(should (featurep 'tramp-test-load)))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors
|
||||
(and (featurep 'tramp-test-load) (unload-feature 'tramp-test-load))
|
||||
(delete-file tmp-name)))))
|
||||
@@ -1317,6 +1360,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
;; A non-nil DISPLAY must not raise the buffer.
|
||||
(should-not (get-buffer-window (current-buffer) t))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name)))))
|
||||
|
||||
(ert-deftest tramp-test27-start-file-process ()
|
||||
@@ -1345,6 +1389,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(while (< (- (point-max) (point-min)) (length "foo"))
|
||||
(accept-process-output proc 1)))
|
||||
(should (string-equal (buffer-string) "foo")))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-process proc)))
|
||||
|
||||
(unwind-protect
|
||||
@@ -1361,6 +1407,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(while (< (- (point-max) (point-min)) (length "foo"))
|
||||
(accept-process-output proc 1)))
|
||||
(should (string-equal (buffer-string) "foo")))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors
|
||||
(delete-process proc)
|
||||
(delete-file tmp-name)))
|
||||
@@ -1380,6 +1428,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(while (< (- (point-max) (point-min)) (length "foo"))
|
||||
(accept-process-output proc 1)))
|
||||
(should (string-equal (buffer-string) "foo")))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-process proc)))))
|
||||
|
||||
(ert-deftest tramp-test28-shell-command ()
|
||||
@@ -1409,6 +1459,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(should
|
||||
(string-equal
|
||||
(format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name)))
|
||||
|
||||
(unwind-protect
|
||||
@@ -1434,6 +1486,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(should
|
||||
(string-equal
|
||||
(format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name)))
|
||||
|
||||
(unwind-protect
|
||||
@@ -1461,6 +1515,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(should
|
||||
(string-equal
|
||||
(format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name)))))
|
||||
|
||||
(ert-deftest tramp-test29-vc-registered ()
|
||||
@@ -1521,7 +1577,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
(list (file-name-nondirectory tmp-name2)))))))
|
||||
(should (vc-registered tmp-name2)))
|
||||
|
||||
(ignore-errors (delete-directory tmp-name1 'recursive)))))
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-directory tmp-name1 'recursive)))))
|
||||
|
||||
(ert-deftest tramp-test30-make-auto-save-file-name ()
|
||||
"Check `make-auto-save-file-name'."
|
||||
@@ -1603,6 +1660,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
||||
tmp-name2)))
|
||||
(should (file-directory-p tmp-name2)))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-file tmp-name1))
|
||||
(ignore-errors (delete-directory tmp-name2 'recursive)))))
|
||||
|
||||
@@ -1752,6 +1810,7 @@ This requires restrictions of file name syntax."
|
||||
(delete-directory file1)
|
||||
(should-not (file-exists-p file1)))))
|
||||
|
||||
;; Cleanup.
|
||||
(ignore-errors (delete-directory tmp-name1 'recursive))
|
||||
(ignore-errors (delete-directory tmp-name2 'recursive)))))
|
||||
|
||||
@@ -1805,6 +1864,7 @@ Use the `stat' command."
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "perl" nil)
|
||||
(tramp--test-special-characters))
|
||||
|
||||
;; Reset suppressed properties.
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "perl" 'undef))))
|
||||
@@ -1824,6 +1884,7 @@ Use the `perl' command."
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "stat" nil)
|
||||
(tramp--test-special-characters))
|
||||
|
||||
;; Reset suppressed properties.
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "stat" 'undef))))
|
||||
@@ -1842,6 +1903,7 @@ Use the `ls' command."
|
||||
(tramp-set-connection-property v "stat" nil)
|
||||
(tramp-set-connection-property v "perl" nil)
|
||||
(tramp--test-special-characters))
|
||||
|
||||
;; Reset suppressed properties.
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "stat" 'undef)
|
||||
@@ -1879,6 +1941,7 @@ Use the `stat' command."
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "perl" nil)
|
||||
(tramp--test-utf8))
|
||||
|
||||
;; Reset suppressed properties.
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "perl" 'undef))))
|
||||
@@ -1898,6 +1961,7 @@ Use the `perl' command."
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "stat" nil)
|
||||
(tramp--test-utf8))
|
||||
|
||||
;; Reset suppressed properties.
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "stat" 'undef))))
|
||||
@@ -1916,6 +1980,7 @@ Use the `ls' command."
|
||||
(tramp-set-connection-property v "stat" nil)
|
||||
(tramp-set-connection-property v "perl" nil)
|
||||
(tramp--test-utf8))
|
||||
|
||||
;; Reset suppressed properties.
|
||||
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
|
||||
(tramp-set-connection-property v "stat" 'undef)
|
||||
|
||||
Reference in New Issue
Block a user