diff options
| author | Michael Albinus | 2017-10-24 11:55:20 +0200 |
|---|---|---|
| committer | Michael Albinus | 2017-10-24 11:55:20 +0200 |
| commit | 46f2ee0d4c7123941bb8decc5e947e356099d7b6 (patch) | |
| tree | 19d227495dba3b8ca219d1ca0ead64bd550c27d1 | |
| parent | b51009d7f02b796bcdf9b0893bc4ad348460e844 (diff) | |
| download | emacs-46f2ee0d4c7123941bb8decc5e947e356099d7b6.tar.gz emacs-46f2ee0d4c7123941bb8decc5e947e356099d7b6.zip | |
* test/lisp/net/tramp-tests.el (tramp-test41-delay-load): New test.
(tramp-test42-unload): Rename.
| -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 fdd816dae2e..7e644e6a2bb 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -4333,7 +4333,29 @@ process sentinels. They shall not disturb each other." | |||
| 4333 | (mapconcat 'shell-quote-argument load-path " -L ") | 4333 | (mapconcat 'shell-quote-argument load-path " -L ") |
| 4334 | (shell-quote-argument code))))))) | 4334 | (shell-quote-argument code))))))) |
| 4335 | 4335 | ||
| 4336 | (ert-deftest tramp-test41-unload () | 4336 | (ert-deftest tramp-test41-delay-load () |
| 4337 | "Check that Tramp is loaded lazily, only when needed." | ||
| 4338 | ;; Tramp is neither loaded at Emacs startup, nor when completing a | ||
| 4339 | ;; non-Tramp file name like "/foo". Completing a Tramp-alike file | ||
| 4340 | ;; name like "/foo:" autoloads Tramp. | ||
| 4341 | (let ((code | ||
| 4342 | "(progn \ | ||
| 4343 | (message \"Tramp loaded: %s\" (featurep 'tramp)) \ | ||
| 4344 | (file-name-all-completions \"/foo\" \"/\") \ | ||
| 4345 | (message \"Tramp loaded: %s\" (featurep 'tramp)) \ | ||
| 4346 | (file-name-all-completions \"/foo:\" \"/\") \ | ||
| 4347 | (message \"Tramp loaded: %s\" (featurep 'tramp)))")) | ||
| 4348 | (should | ||
| 4349 | (string-match | ||
| 4350 | "Tramp loaded: nil[\n\r]+Tramp loaded: nil[\n\r]+Tramp loaded: t[\n\r]+" | ||
| 4351 | (shell-command-to-string | ||
| 4352 | (format | ||
| 4353 | "%s -batch -Q -L %s --eval %s" | ||
| 4354 | (expand-file-name invocation-name invocation-directory) | ||
| 4355 | (mapconcat 'shell-quote-argument load-path " -L ") | ||
| 4356 | (shell-quote-argument code))))))) | ||
| 4357 | |||
| 4358 | (ert-deftest tramp-test42-unload () | ||
| 4337 | "Check that Tramp and its subpackages unload completely. | 4359 | "Check that Tramp and its subpackages unload completely. |
| 4338 | Since it unloads Tramp, it shall be the last test to run." | 4360 | Since it unloads Tramp, it shall be the last test to run." |
| 4339 | :tags '(:expensive-test) | 4361 | :tags '(:expensive-test) |