diff options
| author | Michael Albinus | 2017-06-16 14:46:25 +0200 |
|---|---|---|
| committer | Michael Albinus | 2017-06-16 14:46:25 +0200 |
| commit | ea196ebb93188b0962f478f5dec0ff0645c4da10 (patch) | |
| tree | b246e18195e13df653d77f6c2defb2dcce3ac7d5 /test | |
| parent | 8c21f8fab915a5dabd7c3d10aae07ff36a3830e4 (diff) | |
| download | emacs-ea196ebb93188b0962f478f5dec0ff0645c4da10.tar.gz emacs-ea196ebb93188b0962f478f5dec0ff0645c4da10.zip | |
Fix load-path issue when it contains remote directories
* lisp/net/tramp.el (tramp-file-name-handler): Use `autoloadp'.
(tramp-use-absolute-autoload-file-names): New defun. Call it
after loading tramp.el.
* test/lisp/net/tramp-tests.el (tramp-test38-remote-load-path):
New test.
(tramp-test39-unload): Rename.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 3c1e76e8772..a90e3fff355 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -3762,7 +3762,29 @@ process sentinels. They shall not disturb each other." | |||
| 3762 | (mapconcat 'shell-quote-argument load-path " -L ") | 3762 | (mapconcat 'shell-quote-argument load-path " -L ") |
| 3763 | (shell-quote-argument code))))))) | 3763 | (shell-quote-argument code))))))) |
| 3764 | 3764 | ||
| 3765 | (ert-deftest tramp-test38-unload () | 3765 | (ert-deftest tramp-test38-remote-load-path () |
| 3766 | "Check that Tramp autoloads its packages with remote `load-path'." | ||
| 3767 | ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el. | ||
| 3768 | ;; It shall still work, when a remote file name is in the | ||
| 3769 | ;; `load-path'. | ||
| 3770 | (let ((code | ||
| 3771 | "(let ((force-load-messages t)\ | ||
| 3772 | (load-path (cons \"/foo:bar:\" load-path)))\ | ||
| 3773 | (tramp-cleanup-all-connections))")) | ||
| 3774 | (should | ||
| 3775 | (string-match | ||
| 3776 | (format | ||
| 3777 | "Loading %s" | ||
| 3778 | (expand-file-name | ||
| 3779 | "tramp-cmds" (file-name-directory (locate-library "tramp")))) | ||
| 3780 | (shell-command-to-string | ||
| 3781 | (format | ||
| 3782 | "%s -batch -Q -L %s -l tramp-sh --eval %s" | ||
| 3783 | (expand-file-name invocation-name invocation-directory) | ||
| 3784 | (mapconcat 'shell-quote-argument load-path " -L ") | ||
| 3785 | (shell-quote-argument code))))))) | ||
| 3786 | |||
| 3787 | (ert-deftest tramp-test39-unload () | ||
| 3766 | "Check that Tramp and its subpackages unload completely. | 3788 | "Check that Tramp and its subpackages unload completely. |
| 3767 | Since it unloads Tramp, it shall be the last test to run." | 3789 | Since it unloads Tramp, it shall be the last test to run." |
| 3768 | ;; Mark as failed until all symbols are unbound. | 3790 | ;; Mark as failed until all symbols are unbound. |