]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Fix test.
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 30 Dec 2022 08:26:56 +0000 (09:26 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 30 Dec 2022 08:26:56 +0000 (09:26 +0100)
test/lisp/net/tramp-tests.el

index 79b2fc803d6be6c6e3067ec109d4b681c1553730..8d63bb3de9bb581c32505ea6c797bf9ac75597ab 100644 (file)
@@ -5503,15 +5503,11 @@ INPUT, if non-nil, is a string sent to the process."
               ;; String to be sent.
               (format "%s\n" (file-name-nondirectory tmp-name)))
              (should
-              (string-equal
-               ;; tramp-adb.el echoes, so we must add the string.
-               (if (and (tramp--test-adb-p)
-                        (not (tramp-direct-async-process-p)))
-                   (format
-                    "%s\n%s\n"
-                    (file-name-nondirectory tmp-name)
-                    (file-name-nondirectory tmp-name))
-                 (format "%s\n" (file-name-nondirectory tmp-name)))
+              (string-match-p
+               ;; Some shells echo, for example the "adb" or "docker" methods.
+               (tramp-compat-rx
+                bos (** 1 2 (literal (file-name-nondirectory tmp-name)) "\n")
+                eos)
                (buffer-string))))
 
          ;; Cleanup.