diff options
| author | Michael Albinus <michael.albinus@gmx.de> | 2026-05-06 16:06:50 +0200 |
|---|---|---|
| committer | Michael Albinus <michael.albinus@gmx.de> | 2026-05-06 16:06:50 +0200 |
| commit | eae96d9fcb8ea44f94eaf9e4511739a7f93aadf8 (patch) | |
| tree | 14277620f6ed08ace741d524cf4f8192e0e09f2d /test | |
| parent | dfc7cf8e411964d220843cd03a15be1ce06fbb3f (diff) | |
Handle long environment variables in Tramp oricesses
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Handle loooong environment variables. (Bug#80783)
* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Adapt test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 05c3f72229d..c76d6d54c3d 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -6519,7 +6519,7 @@ INPUT, if non-nil, is a string sent to the process." ;; (should (= 11 (point))))))))))))) ))))))))) -;; This test is inspired by Bug#23952. +;; This test is inspired by Bug#23952 and Bug#80783. (ert-deftest tramp-test33-environment-variables () "Check that remote processes set / unset environment variables properly." :tags '(:expensive-test) @@ -6611,7 +6611,18 @@ INPUT, if non-nil, is a string sent to the process." ;; We must suppress "_=VAR...". (funcall this-shell-command-to-string - "printenv | grep -v PS1 | grep -v _="))))))))) + "printenv | grep -v PS1 | grep -v _=")))))) + + ;; Handle looooong environment variables. Bug#80783. + ;; FIXME: Make it also work in the synchronous case. + (unless (or (eq this-shell-command-to-string 'shell-command-to-string) + (tramp-direct-async-process-p)) + (let* ((bad (concat envvar "=" (make-string 2024 ?x))) + (process-environment + (cl-list* bad bad bad bad process-environment))) + (should + (string-match-p + "foo" (funcall this-shell-command-to-string "echo foo")))))))) (tramp--test-deftest-direct-async-process tramp-test33-environment-variables) |
