aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-10-12 12:20:55 +0200
committerMichael Albinus2019-10-12 12:20:55 +0200
commit15ed1598b5e8aacea2825e6144cb3cce35101134 (patch)
tree97db026ac9715dc5646d0edd5b6ee56ee0325862
parent251c215f65d8af010b1b73d171edac179e3b5da5 (diff)
downloademacs-15ed1598b5e8aacea2825e6144cb3cce35101134.tar.gz
emacs-15ed1598b5e8aacea2825e6144cb3cce35101134.zip
Adapt some Tramp tests
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test17-insert-directory): Adapt regexp of summary line. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test for symlinked directories.
-rw-r--r--test/lisp/net/tramp-archive-tests.el2
-rw-r--r--test/lisp/net/tramp-tests.el24
2 files changed, 15 insertions, 11 deletions
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el
index 02fe8edf271..00d3b4a478a 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -569,7 +569,7 @@ This checks also `file-name-as-directory', `file-name-directory',
569 (looking-at-p 569 (looking-at-p
570 (concat 570 (concat
571 ;; There might be a summary line. 571 ;; There might be a summary line.
572 "\\(total.+[[:digit:]]+\n\\)?" 572 "\\(total.+[[:digit:]]+ ?[kKMGTPEZY]?i?B?\n\\)?"
573 ;; We don't know in which order the files appear. 573 ;; We don't know in which order the files appear.
574 (format 574 (format
575 "\\(.+ %s\\( ->.+\\)?\n\\)\\{%d\\}" 575 "\\(.+ %s\\( ->.+\\)?\n\\)\\{%d\\}"
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index ffaf8ef846b..37021d6c93d 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3265,7 +3265,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3265 (tmp-name3 (tramp--test-make-temp-name 'local quoted)) 3265 (tmp-name3 (tramp--test-make-temp-name 'local quoted))
3266 (tmp-name4 (tramp--test-make-temp-name nil quoted)) 3266 (tmp-name4 (tramp--test-make-temp-name nil quoted))
3267 (tmp-name5 3267 (tmp-name5
3268 (expand-file-name (file-name-nondirectory tmp-name1) tmp-name4))) 3268 (expand-file-name (file-name-nondirectory tmp-name1) tmp-name4))
3269 (tmp-name6 (tramp--test-make-temp-name nil quoted)))
3269 ;; Check `make-symbolic-link'. 3270 ;; Check `make-symbolic-link'.
3270 (unwind-protect 3271 (unwind-protect
3271 (tramp--test-ignore-make-symbolic-link-error 3272 (tramp--test-ignore-make-symbolic-link-error
@@ -3333,17 +3334,20 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3333 (if quoted #'tramp-compat-file-name-unquote #'identity) 3334 (if quoted #'tramp-compat-file-name-unquote #'identity)
3334 (file-remote-p tmp-name1 'localname)) 3335 (file-remote-p tmp-name1 'localname))
3335 (file-symlink-p tmp-name5))) 3336 (file-symlink-p tmp-name5)))
3336 ;; `smbclient' does not show symlinks in directories, so 3337 ;; Check, that files in symlinked directories still work.
3337 ;; we cannot delete a non-empty directory. We delete the 3338 (make-symbolic-link tmp-name4 tmp-name6)
3338 ;; file explicitly. 3339 (write-region "foo" nil (expand-file-name "foo" tmp-name6))
3339 (delete-file tmp-name5)) 3340 (delete-file (expand-file-name "foo" tmp-name6))
3341 (should-not (file-exists-p (expand-file-name "foo" tmp-name4)))
3342 (should-not (file-exists-p (expand-file-name "foo" tmp-name6))))
3340 3343
3341 ;; Cleanup. 3344 ;; Cleanup.
3342 (ignore-errors 3345 (ignore-errors (delete-file tmp-name1))
3343 (delete-file tmp-name1) 3346 (ignore-errors (delete-file tmp-name2))
3344 (delete-file tmp-name2) 3347 (ignore-errors (delete-file tmp-name3))
3345 (delete-file tmp-name3) 3348 (ignore-errors (delete-file tmp-name5))
3346 (delete-directory tmp-name4 'recursive))) 3349 (ignore-errors (delete-file tmp-name6))
3350 (ignore-errors (delete-directory tmp-name4 'recursive)))
3347 3351
3348 ;; Check `add-name-to-file'. 3352 ;; Check `add-name-to-file'.
3349 (unwind-protect 3353 (unwind-protect