diff options
| author | Michael Albinus | 2018-11-06 15:48:05 +0100 |
|---|---|---|
| committer | Michael Albinus | 2018-11-06 15:48:05 +0100 |
| commit | 3abe7bfe306706a95ca8dc404c7645073c949507 (patch) | |
| tree | b4221e4bd7527ce22f3040e0ea6603ec1954c0a7 /test | |
| parent | ff1ee4e0bef4f62b758b70266d2f21be166924c3 (diff) | |
| download | emacs-3abe7bfe306706a95ca8dc404c7645073c949507.tar.gz emacs-3abe7bfe306706a95ca8dc404c7645073c949507.zip | |
Handle also port and domain in Tramp proxy definitions
* doc/misc/tramp.texi (Multi-hops): Exclude ports and domains from
pattern expansion.
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections):
Remove ad-hoc proxies.
* lisp/net/tramp-sh.el (tramp-compute-multi-hops): Handle also
port and domain in the proxy. Propertize ad-hoc proxies.
* lisp/net/tramp.el (tramp-default-proxies-alist): Adapt docstring.
* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate): Extend tests.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index ceda70947c8..4016ece94d3 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -819,12 +819,14 @@ handled properly. BODY shall not contain a timeout." | |||
| 819 | (file-remote-p | 819 | (file-remote-p |
| 820 | (concat | 820 | (concat |
| 821 | "/method1:%u@%h" | 821 | "/method1:%u@%h" |
| 822 | "|method2:%u@%h" | 822 | "|method2:user2@host2" |
| 823 | "|method3:user3@host3:/path/to/file")) | 823 | "|method3:%u@%h" |
| 824 | (format "/%s:%s@%s|%s:%s@%s|%s:%s@%s:" | 824 | "|method4:user4%domain4@host4#1234:/path/to/file")) |
| 825 | "method1" "user3" "host3" | 825 | (format "/%s:%s@%s|%s:%s@%s|%s:%s@%s|%s:%s@%s:" |
| 826 | "method2" "user3" "host3" | 826 | "method1" "user2" "host2" |
| 827 | "method3" "user3" "host3"))))) | 827 | "method2" "user2" "host2" |
| 828 | "method3" "user4" "host4" | ||
| 829 | "method4" "user4%domain4" "host4#1234"))))) | ||
| 828 | 830 | ||
| 829 | (ert-deftest tramp-test02-file-name-dissect-simplified () | 831 | (ert-deftest tramp-test02-file-name-dissect-simplified () |
| 830 | "Check simplified file name components." | 832 | "Check simplified file name components." |
| @@ -1134,12 +1136,14 @@ handled properly. BODY shall not contain a timeout." | |||
| 1134 | (file-remote-p | 1136 | (file-remote-p |
| 1135 | (concat | 1137 | (concat |
| 1136 | "/%u@%h" | 1138 | "/%u@%h" |
| 1139 | "|user2@host2" | ||
| 1137 | "|%u@%h" | 1140 | "|%u@%h" |
| 1138 | "|user3@host3:/path/to/file")) | 1141 | "|user4%domain4@host4#1234:/path/to/file")) |
| 1139 | (format "/%s@%s|%s@%s|%s@%s:" | 1142 | (format "/%s@%s|%s@%s|%s@%s|%s@%s:" |
| 1140 | "user3" "host3" | 1143 | "user2" "host2" |
| 1141 | "user3" "host3" | 1144 | "user2" "host2" |
| 1142 | "user3" "host3")))) | 1145 | "user4" "host4" |
| 1146 | "user4%domain4" "host4#1234")))) | ||
| 1143 | 1147 | ||
| 1144 | ;; Exit. | 1148 | ;; Exit. |
| 1145 | (tramp-change-syntax syntax)))) | 1149 | (tramp-change-syntax syntax)))) |
| @@ -1780,12 +1784,14 @@ handled properly. BODY shall not contain a timeout." | |||
| 1780 | (file-remote-p | 1784 | (file-remote-p |
| 1781 | (concat | 1785 | (concat |
| 1782 | "/[method1/%u@%h" | 1786 | "/[method1/%u@%h" |
| 1783 | "|method2/%u@%h" | 1787 | "|method2/user2@host2" |
| 1784 | "|method3/user3@host3]/path/to/file")) | 1788 | "|method3/%u@%h" |
| 1785 | (format "/[%s/%s@%s|%s/%s@%s|%s/%s@%s]" | 1789 | "|method4/user4%domain4@host4#1234]/path/to/file")) |
| 1786 | "method1" "user3" "host3" | 1790 | (format "/[%s/%s@%s|%s/%s@%s|%s/%s@%s|%s/%s@%s]" |
| 1787 | "method2" "user3" "host3" | 1791 | "method1" "user2" "host2" |
| 1788 | "method3" "user3" "host3")))) | 1792 | "method2" "user2" "host2" |
| 1793 | "method3" "user4" "host4" | ||
| 1794 | "method4" "user4%domain4" "host4#1234")))) | ||
| 1789 | 1795 | ||
| 1790 | ;; Exit. | 1796 | ;; Exit. |
| 1791 | (tramp-change-syntax syntax)))) | 1797 | (tramp-change-syntax syntax)))) |