aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2022-04-08 13:12:26 +0200
committerMichael Albinus2022-04-08 13:12:26 +0200
commit886339747b8d34fc09fd69a143cf548daf92dce6 (patch)
tree9cfb75202d3fac4f786dda288ad242bd8424bd45
parentff997ad7863c7c54a12d0cd07fa4c01766dfcce4 (diff)
downloademacs-886339747b8d34fc09fd69a143cf548daf92dce6.tar.gz
emacs-886339747b8d34fc09fd69a143cf548daf92dce6.zip
Extend tramp-archive-test45-auto-load
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load): Extend test.
-rw-r--r--test/lisp/net/tramp-archive-tests.el47
1 files changed, 25 insertions, 22 deletions
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el
index 5bdae2a760a..aaa41d0c584 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -926,28 +926,31 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
926 (file-attributes %S \"/\")) \ 926 (file-attributes %S \"/\")) \
927 (message \"tramp-archive loaded: %%s\" \ 927 (message \"tramp-archive loaded: %%s\" \
928 (featurep 'tramp-archive))))")) 928 (featurep 'tramp-archive))))"))
929 (dolist (default-directory 929 (dolist (enabled '(t nil))
930 `(,temporary-file-directory 930 (dolist (default-directory
931 ;; Starting Emacs in a directory which has 931 `(,temporary-file-directory
932 ;; `tramp-archive-file-name-regexp' syntax is 932 ;; Starting Emacs in a directory which has
933 ;; supported only with Emacs > 27.2 (sigh!). 933 ;; `tramp-archive-file-name-regexp' syntax is
934 ;; (Bug#48476) 934 ;; supported only with Emacs > 27.2 (sigh!).
935 ,(file-name-as-directory tramp-archive-test-directory))) 935 ;; (Bug#48476)
936 (dolist (file `("/mock::foo" ,(concat tramp-archive-test-archive "foo"))) 936 ,(file-name-as-directory tramp-archive-test-directory)))
937 (should 937 (dolist (file `("/mock::foo" ,(concat tramp-archive-test-archive "foo")))
938 (string-match 938 (should
939 (format 939 (string-match
940 "tramp-archive loaded: %s[[:ascii:]]+tramp-archive loaded: %s" 940 (format
941 (tramp-archive-file-name-p default-directory) 941 "tramp-archive loaded: %s[[:ascii:]]+tramp-archive loaded: %s"
942 (or (tramp-archive-file-name-p default-directory) 942 (tramp-archive-file-name-p default-directory)
943 (tramp-archive-file-name-p file))) 943 (or (tramp-archive-file-name-p default-directory)
944 (shell-command-to-string 944 (and enabled (tramp-archive-file-name-p file))))
945 (format 945 (shell-command-to-string
946 "%s -batch -Q -L %s --eval %s" 946 (format
947 (shell-quote-argument 947 "%s -batch -Q -L %s --eval %s --eval %s"
948 (expand-file-name invocation-name invocation-directory)) 948 (shell-quote-argument
949 (mapconcat #'shell-quote-argument load-path " -L ") 949 (expand-file-name invocation-name invocation-directory))
950 (shell-quote-argument (format code file)))))))))) 950 (mapconcat #'shell-quote-argument load-path " -L ")
951 (shell-quote-argument
952 (format "(setq tramp-archive-enabled %s)" enabled))
953 (shell-quote-argument (format code file)))))))))))
951 954
952(ert-deftest tramp-archive-test45-delay-load () 955(ert-deftest tramp-archive-test45-delay-load ()
953 "Check that `tramp-archive' is loaded lazily, only when needed." 956 "Check that `tramp-archive' is loaded lazily, only when needed."