emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 886339747b 2/2: Extend tramp-archive-test45-auto-load


From: Michael Albinus
Subject: emacs-28 886339747b 2/2: Extend tramp-archive-test45-auto-load
Date: Fri, 8 Apr 2022 07:12:40 -0400 (EDT)

branch: emacs-28
commit 886339747b8d34fc09fd69a143cf548daf92dce6
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Extend tramp-archive-test45-auto-load
    
    * test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load):
    Extend test.
---
 test/lisp/net/tramp-archive-tests.el | 47 +++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 22 deletions(-)

diff --git a/test/lisp/net/tramp-archive-tests.el 
b/test/lisp/net/tramp-archive-tests.el
index 5bdae2a760..aaa41d0c58 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'."
               (file-attributes %S \"/\")) \
            (message \"tramp-archive loaded: %%s\" \
               (featurep 'tramp-archive))))"))
-    (dolist (default-directory
-              `(,temporary-file-directory
-               ;;  Starting Emacs in a directory which has
-               ;; `tramp-archive-file-name-regexp' syntax is
-               ;; supported only with Emacs > 27.2 (sigh!).
-               ;; (Bug#48476)
-                ,(file-name-as-directory tramp-archive-test-directory)))
-      (dolist (file `("/mock::foo" ,(concat tramp-archive-test-archive "foo")))
-        (should
-         (string-match
-         (format
-          "tramp-archive loaded: %s[[:ascii:]]+tramp-archive loaded: %s"
-          (tramp-archive-file-name-p default-directory)
-          (or (tramp-archive-file-name-p default-directory)
-               (tramp-archive-file-name-p file)))
-         (shell-command-to-string
-          (format
-           "%s -batch -Q -L %s --eval %s"
-           (shell-quote-argument
-            (expand-file-name invocation-name invocation-directory))
-           (mapconcat #'shell-quote-argument load-path " -L ")
-           (shell-quote-argument (format code file))))))))))
+    (dolist (enabled '(t nil))
+      (dolist (default-directory
+               `(,temporary-file-directory
+                ;;  Starting Emacs in a directory which has
+                ;; `tramp-archive-file-name-regexp' syntax is
+                ;; supported only with Emacs > 27.2 (sigh!).
+                ;; (Bug#48476)
+                 ,(file-name-as-directory tramp-archive-test-directory)))
+       (dolist (file `("/mock::foo" ,(concat tramp-archive-test-archive 
"foo")))
+          (should
+           (string-match
+           (format
+            "tramp-archive loaded: %s[[:ascii:]]+tramp-archive loaded: %s"
+            (tramp-archive-file-name-p default-directory)
+            (or (tramp-archive-file-name-p default-directory)
+                (and enabled (tramp-archive-file-name-p file))))
+           (shell-command-to-string
+            (format
+             "%s -batch -Q -L %s --eval %s --eval %s"
+             (shell-quote-argument
+              (expand-file-name invocation-name invocation-directory))
+             (mapconcat #'shell-quote-argument load-path " -L ")
+             (shell-quote-argument
+              (format "(setq tramp-archive-enabled %s)" enabled))
+             (shell-quote-argument (format code file)))))))))))
 
 (ert-deftest tramp-archive-test45-delay-load ()
   "Check that `tramp-archive' is loaded lazily, only when needed."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]