(ignore-errors (delete-process (get-buffer-process buf)))
(ignore-errors (kill-buffer buf)))
(ignore-errors (cancel-timer timer))
- (ignore-errors (delete-directory tmp-name 'recursive))))))
+ (ignore-errors (delete-directory tmp-name 'recursive)))))))
- (ert-deftest tramp-test42-recursive-load ()
+ (ert-deftest tramp-test42-auto-load ()
+ "Check that Tramp autoloads properly."
+ (skip-unless (tramp--test-enabled))
+ (skip-unless (not (tramp--test-mock-p)))
+
+ (let ((default-directory (expand-file-name temporary-file-directory)))
+ (let ((code
+ (format
+ "(message \"Tramp loaded: %%s\" (consp (file-attributes \"%s\")))"
+ tramp-test-temporary-file-directory)))
+ (should
+ (string-match
+ "Tramp loaded: t[\n\r]+"
+ (shell-command-to-string
+ (format
+ "%s -batch -Q -L %s --eval %s"
+ (expand-file-name invocation-name invocation-directory)
+ (mapconcat 'shell-quote-argument load-path " -L ")
+ (shell-quote-argument code))))))))
+
+ (ert-deftest tramp-test43-recursive-load ()
"Check that Tramp does not fail due to recursive load."
(skip-unless (tramp--test-enabled))