summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-archive-resources/foo.tar.gzbin234 -> 274 bytes
-rw-r--r--test/lisp/net/tramp-archive-tests.el32
2 files changed, 18 insertions, 14 deletions
diff --git a/test/lisp/net/tramp-archive-resources/foo.tar.gz b/test/lisp/net/tramp-archive-resources/foo.tar.gz
index 68925b147fc..0d2e9878dd7 100644
--- a/test/lisp/net/tramp-archive-resources/foo.tar.gz
+++ b/test/lisp/net/tramp-archive-resources/foo.tar.gz
Binary files differ
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el
index 149ed370432..82dd5de8b9a 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -99,9 +99,9 @@ variables, so we check the Emacs version directly."
(tramp-archive-file-name-p (concat tramp-archive-test-archive "foo/bar")))
;; A file archive inside a file archive.
(should
- (tramp-archive-file-name-p (concat tramp-archive-test-archive "foo.tar")))
+ (tramp-archive-file-name-p (concat tramp-archive-test-archive "baz.tar")))
(should
- (tramp-archive-file-name-p (concat tramp-archive-test-archive "foo.tar/"))))
+ (tramp-archive-file-name-p (concat tramp-archive-test-archive "baz.tar/"))))
(ert-deftest tramp-archive-test02-file-name-dissect ()
"Check archive file name components."
@@ -145,13 +145,14 @@ variables, so we check the Emacs version directly."
;; File archive in file archive.
(let* ((tramp-archive-test-file-archive
- (concat tramp-archive-test-archive "bar.tar"))
+ (concat tramp-archive-test-archive "baz.tar"))
(tramp-archive-test-archive
(file-name-as-directory tramp-archive-test-file-archive))
(tramp-methods (cons `(,tramp-archive-method) tramp-methods))
(tramp-gvfs-methods tramp-archive-all-gvfs-methods))
(unwind-protect
- (with-parsed-tramp-archive-file-name tramp-archive-test-archive nil
+ (with-parsed-tramp-archive-file-name
+ (expand-file-name "bar" tramp-archive-test-archive) nil
(should (string-equal method tramp-archive-method))
(should-not user)
(should-not domain)
@@ -184,8 +185,12 @@ variables, so we check the Emacs version directly."
nil "/"))
(file-name-nondirectory tramp-archive-test-file-archive)))))
(should-not port)
- (should (string-equal localname "/"))
- (should (string-equal archive tramp-archive-test-file-archive)))
+ (should (string-equal localname "/bar"))
+ ;; The `archive' component is now already a Tramp file name.
+ (should
+ (string-equal
+ archive
+ (tramp-archive-gvfs-file-name tramp-archive-test-file-archive))))
;; Cleanup.
(tramp-archive-cleanup-hash))))
@@ -290,9 +295,8 @@ This checks also `file-name-as-directory', `file-name-directory',
:type tramp-file-missing))
;; Cleanup.
- (ignore-errors
- (tramp-archive--test-delete tmp-name)
- (tramp-archive-cleanup-hash)))))
+ (ignore-errors (tramp-archive--test-delete tmp-name))
+ (tramp-archive-cleanup-hash))))
(ert-deftest tramp-archive-test09-insert-file-contents ()
"Check `insert-file-contents'."
@@ -444,7 +448,7 @@ This checks also `file-name-as-directory', `file-name-directory',
(skip-unless tramp-gvfs-enabled)
(let ((tmp-name tramp-archive-test-archive)
- (files '("." ".." "bar" "foo.hrd" "foo.lnk" "foo.txt")))
+ (files '("." ".." "bar" "baz.tar" "foo.hrd" "foo.lnk" "foo.txt")))
(unwind-protect
(progn
(should (file-directory-p tmp-name))
@@ -656,7 +660,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
;; Local files.
(should (equal (file-name-completion "fo" tmp-name) "foo."))
(should (equal (file-name-completion "foo.txt" tmp-name) t))
- (should (equal (file-name-completion "b" tmp-name) "bar/"))
+ (should (equal (file-name-completion "b" tmp-name) "ba"))
(should-not (file-name-completion "a" tmp-name))
(should
(equal
@@ -668,18 +672,18 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
(should
(equal
(sort (file-name-all-completions "b" tmp-name) 'string-lessp)
- '("bar/")))
+ '("bar/" "baz.tar")))
(should-not (file-name-all-completions "a" tmp-name))
;; `completion-regexp-list' restricts the completion to
;; files which match all expressions in this list.
(let ((completion-regexp-list
`(,directory-files-no-dot-files-regexp "b")))
(should
- (equal (file-name-completion "" tmp-name) "bar/"))
+ (equal (file-name-completion "" tmp-name) "ba"))
(should
(equal
(sort (file-name-all-completions "" tmp-name) 'string-lessp)
- '("bar/")))))
+ '("bar/" "baz.tar")))))
;; Cleanup.
(tramp-archive-cleanup-hash))))