summaryrefslogtreecommitdiff
path: root/test/lisp/net
Commit message (Collapse)AuthorAgeFilesLines
* Make use of rx in Tramp backward compatobleMichael Albinus2022-09-092-54/+80
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-rx--runtime-params): New defvar. (tramp-compat-rx--transform-items) (tramp-compat-rx--transform-item, tramp-compat-rx--transform): New defuns. Suggested by Mattias Engdegård <mattiase@acm.org>. (tramp-compat-rx): New defalias or defmacro. (tramp-compat-string-replace, tramp-compat-string-search): Use regexp-quote. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `tramp-compat-rx' where indicated. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `tramp-compat-rx' where indicated.
* test: Remove redundant "" arg to `mapconcat`Stefan Monnier2022-09-081-1/+1
| | | | | | | | | | | | | | | | | | | * test/src/process-tests.el (process-test-stderr-filter): * test/src/print-tests.el (print-tests-continuous-numbering): * test/src/fns-tests.el (fns-tests-mapconcat): * test/src/data-tests.el (test-bool-vector-to-hex-string): * test/src/casefiddle-tests.el (casefiddle-tests-char-properties) (casefiddle-tests-case-table, casefiddle-tests-casing-character): * test/lisp/tabify-tests.el (tabify-tests--test-changes): * test/lisp/subr-tests.el (subr-tests-bug22027): * test/lisp/sort-tests.el (sort-tests-random-word): * test/lisp/net/hmac-md5-tests.el (hmac-md5-test-encode-string): * test/lisp/md4-tests.el (md4-tests-digest->hex): * test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map): * test/lisp/dired-tests.el (dired-test-directory-files): * test/lisp/char-fold-tests.el (char-fold--random-word): * test/lisp/ansi-color-tests.el (ansi-color-incomplete-sequences-test): Remove redundant "" arg to `mapconcat`.
* Make call of remote `id' more performant in TrampMichael Albinus2022-09-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-file-exists-p): New defun. (tramp-adb-file-name-handler-alist): Use it. (tramp-adb-handle-file-executable-p) (tramp-adb-handle-file-readable-p) (tramp-adb-handle-file-writable-p) (tramp-adb-handle-get-remote-uid) (tramp-adb-handle-get-remote-gid) (tramp-adb-handle-get-remote-groups): Use caches consequently. * lisp/net/tramp-sh.el (tramp-perl-id, tramp-python-id): New defconsts. (tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid) (tramp-sh-handle-get-remote-groups): Use caches consequently. (tramp-sh-handle-file-writable-p): Use `file-writable-p'. (tramp-expand-script): Handle also "python" expansion. (tramp-get-remote-id): Do not set connection property anymore, this is done differently now. (tramp-get-remote-uid-with-id, tramp-get-remote-uid-with-perl) (tramp-get-remote-uid-with-python, tramp-get-remote-gid-with-id) (tramp-get-remote-gid-with-perl) (tramp-get-remote-gid-with-python): Remove. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p) (tramp-sudoedit-handle-file-exists-p) (tramp-sudoedit-handle-file-readable-p) (tramp-sudoedit-handle-file-writable-p): (tramp-sudoedit-handle-get-remote-uid) (tramp-sudoedit-handle-get-remote-gid) (tramp-sudoedit-handle-get-remote-groups): Use caches consequently. * lisp/net/tramp.el (tramp-check-cached-permissions): Call `tramp-get-remote-groups' only if needed. (tramp-get-remote-groups): Do not return default value. (tramp-read-id-output): New defun. * test/lisp/net/tramp-tests.el (tramp--test-deftest-with-perl): Suppress also remote `id'.
* Use secondary groups when checking permissions in Tramp (Bug#57044)Michael Albinus2022-09-062-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-check-cached-permissions): Check also for secondary groups. (Bug#57044) (tramp-get-remote-groups): * lisp/net/tramp-adb.el (tramp-adb-handle-get-remote-groups): * lisp/net/tramp-sh.el (tramp-sh-handle-get-remote-groups): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-get-remote-groups): New defuns. * lisp/net/tramp.el (tramp-file-name-for-operation): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `tramp-get-remote-groups'. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-cache.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `blank' in `rx' forms. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `blank' in `rx' forms.
* Fix rx forms in TrampMichael Albinus2022-09-042-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-restricted-shell-hosts-alist) (tramp-local-host-regexp, tramp-echoed-echo-mark-regexp) (tramp-login-prompt-regexp, tramp-terminal-prompt-regexp) (tramp-antispoof-regexp) (tramp-build-completion-file-name-regexp) (tramp-debug-outline-regexp) (tramp-use-absolute-autoload-file-names) (tramp-lock-file-info-regexp, tramp-shell-quote-argument): * lisp/net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls) * lisp/net/tramp-cache.el (tramp-flush-file-function): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp) (info-lookup-maybe-add-help): * lisp/net/tramp-sh.el (tramp-default-user-alist, tramp-sunos-unames) (tramp-scp-direct-remote-copying, tramp-get-remote-locale): * lisp/net/tramp-smb.el (tramp-smb-prompt, tramp-smb-wrong-passwd-regexp) (tramp-smb-errors, tramp-smb-get-localname) (tramp-smb-read-file-entry): Simplify rx forms. * lisp/net/tramp.el (tramp-handle-find-backup-file-name) (tramp-handle-lock-file, tramp-handle-make-auto-save-file-name): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times) (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes-with-gvfs-ls-regexp): * lisp/net/tramp-sh.el (tramp-open-shell, tramp-find-shell): Do not use `eval-when-compile'. * lisp/net/tramp-cmds.el (tramp-rename-files, tramp-rename-these-files): Use rx. * lisp/net/tramp-gvfs.el (tramp-gvfs-password-tcrypt): New defonst. (tramp-gvfs-handle-file-attributes): Use `number-to-string'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test17-insert-directory): * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory) (tramp--test-share-p): Simplify rx forms.
* Add tests for ‘mailcap-add-mailcap-entry’Felix Dietrich2022-09-021-0/+405
| | | | | * test/lisp/net/mailcap-tests.el: Add tests for ‘mailcap-add-mailcap-entry’
* Use `rx' in Tramp where possibleMichael Albinus2022-08-262-144/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-cache.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-compat.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `rx' where possible. * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): Use `eval-when-compile'. (tramp-adb-maybe-open-connection): Use file-property for "/". Use `eval-when-compile'. * lisp/net/tramp-cmds.el (mm-7bit-chars): Declare. (tramp-reporter-dump-variable): Simplify point movement. * lisp/net/tramp-gvfs.el (tramp-dbus-function): Fix typo. (tramp-zeroconf-parse-device-names): Use `tramp-prefix-port-format'. * lisp/net/tramp-sh.el (tramp-open-shell, tramp-find-shell): Use `eval-when-compile'. Improve sanity check. * lisp/net/tramp.el (tramp-prefix-format, tramp-prefix-regexp) (tramp-method-regexp, tramp-postfix-method-format) (tramp-postfix-method-regexp, tramp-prefix-ipv6-format) (tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format) (tramp-postfix-ipv6-regexp, tramp-postfix-host-format) (tramp-postfix-host-regexp, tramp-remote-file-name-spec-regexp) (tramp-file-name-structure, tramp-file-name-regexp) (tramp-completion-method-regexp) (tramp-completion-file-name-regexp): Declare. (tramp-set-syntax): Set also `tramp-completion-method-regexp'. (tramp-volume-letter-regexp, tramp-completion-method-regexp-alist): New defconsts. (tramp-build-completion-method-regexp): New defun. (tramp-completion-method-regexp): New defvar. (tramp-completion-file-name-regexp-default) (tramp-completion-file-name-regexp-simplified) (tramp-completion-file-name-regexp-separate) (tramp-completion-file-name-regexp-alist): Remove. (tramp-build-completion-file-name-regexp): Rwrite. (tramp-make-tramp-file-name): Use `tramp-archive-method'. (tramp-handle-file-directory-p): Ignore errors. (tramp-handle-find-backup-file-name, tramp-handle-lock-file) (tramp-handle-make-auto-save-file-name): Use `eval-when-compile'. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `rx' where possible. (tramp-test01-file-name-syntax): Adapt test.
* Minor fixes in tramp-tests.elMichael Albinus2022-08-251-26/+41
| | | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat) (tramp--test-deftest-with-perl) (tramp--test-deftest-with-ls): Skip if underlying test didn't run or lasted too long. (tramp--test-shell-file-name): Do not depend on `tramp--test-adb-p'.
* * test/lisp/net/tramp-tests.el (tramp--test-utf8): Adapt test.Michael Albinus2022-08-111-1/+2
|
* Further Tramp fixes for Android 12Michael Albinus2022-08-091-22/+10
| | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-file-attributes) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-file-name-all-completions): Pipe "ls" output through "cat", in order to avoid quoting special characters. (tramp-adb-sh-fix-ls-output): Remove fix for file names with spaces. * test/lisp/net/tramp-tests.el (tramp-test22-file-times): Adapt test.
* ; Fix typosStefan Kangas2022-08-081-1/+1
|
* Adapt Tramp for Android 12Michael Albinus2022-08-061-21/+35
| | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-methods): Use "%d". (tramp-adb-handle-directory-files-and-attributes): Fix "." and ".." in listing. (tramp-adb-sh-fix-ls-output): Fix file names with spaces. (tramp-adb-maybe-open-connection): Compute args from `tramp-login-args'. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-handle-make-process): Check for adb device if indicated. * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory) (tramp-test22-file-times): Adapt tests.
* Move netrc tests to auth-source-tests.elLars Ingebrigtsen2022-08-044-74/+0
|
* Fix Tramp testMichael Albinus2022-08-041-1/+1
| | | | | | * test/lisp/net/tramp-tests.el (tramp-test48-unload): Ignore autoload functions in `tramp-file-name' structure tests, since `tramp-file-name-handler' is also autoloaded.
* Reorganize TrampMichael Albinus2022-08-031-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-write-region): Handle special case that START is "". (tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-adb-handle-make-process): Use `with-tramp-saved-connection-properties'. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Use `tramp-archive-handle-file-exists-p'. (tramp-archive-handle-file-exists-p): New defun. (tramp-archive-file-name-handler): Add ;;;###tramp-autoload cookie. * lisp/net/tramp-cache.el (tramp-compat, tramp-loaddefs) (time-stamp): Require. (tramp-get-file-property, tramp-set-file-property) (tramp-flush-file-property, tramp-flush-file-upper-properties) (tramp-flush-file-properties): Use `tramp-file-name-unify'. Adapt message. (tramp-flush-directory-properties): Simplify. (tramp-flush-file-function): Add ;;;###tramp-autoload cookie. Don't use `with-parsed-tramp-file-name', it isn't exposed. (with-tramp-file-property, with-tramp-connection-property) (with-tramp-saved-connection-property): Macros moved from tramp.el. (with-tramp-saved-file-property) (with-tramp-saved-file-properties) (with-tramp-saved-connection-properties): New defmacros. * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Flush "/". * lisp/net/tramp-crypt.el (tramp-crypt-handle-set-file-modes) (tramp-crypt-handle-set-file-times) (tramp-crypt-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-ftp.el (tramp-archive-file-name-handler): Don't declare. * lisp/net/tramp-gvfs.el (tramp-gvfs-info): New defun. (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file, tramp-gvfs-get-root-attributes) (tramp-gvfs-handle-make-directory): Use it. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Expand TARGET when flushing file properties. (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-sh-handle-file-name-all-completions): Protect, when connection is not established yet. (tramp-do-copy-or-rename-file-directly): Flush file properties of NEWNAME when constructing a new remote file name. (tramp-do-copy-or-rename-file-out-of-band, tramp-sh-handle-make-process): Use `with-tramp-saved-connection-properties'. (tramp-sh-handle-delete-file): Flush file properties only after deleting, otherwise we get a false alarm. (tramp-sh-handle-process-file): Flush "/". (tramp-sh-handle-write-region): Handle special case that START is "". * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process): Use `with-tramp-saved-connection-properties'. (tramp-smb-remote-acl-p): New defun. (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl): Use it. (tramp-smb-handle-set-file-modes): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-smb-handle-process-file, tramp-smb-maybe-open-connection): Flush "/". * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): Flush "/". (tramp-sshfs-handle-set-file-modes) (tramp-sshfs-handle-set-file-times): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes) (tramp-sudoedit-handle-set-file-times) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp.el (tramp-archive-file-name-handler): Don't declare. (tramp-verbose, tramp-file-name-unify, tramp-tramp-file-p) (tramp-file-local-name, tramp-dissect-file-name) (tramp-make-tramp-file-name, tramp-get-connection-buffer) (tramp-get-buffer-string, tramp-debug-message) (tramp-inhibit-progress-reporter, tramp-message): Add ;;;###tramp-autoload cookie. (tramp-file-name): Expose defstruct to tramp-loaddefs.el (tramp-file-name-unify): New optional arg FILE. (tramp-get-default-directory, tramp-get-buffer-string) (tramp-message, tramp-backtrace, tramp-error-with-buffer) (tramp-with-demoted-errors, tramp-barf-if-file-missing) (tramp-skeleton-copy-directory, tramp-skeleton-delete-directory) (tramp-skeleton-directory-files) (tramp-skeleton-directory-files-and-attributes) (tramp-skeleton-file-local-copy, tramp-skeleton-write-region): Remove `tramp-suppress-trace' property, it isn't needed for defmacros and defsubsts. (with-tramp-file-property, with-tramp-connection-property) (with-tramp-saved-connection-property): Move macros to tramp-cache.el. (tramp-skeleton-directory-files-and-attributes): Fix implementation. (tramp-skeleton-file-local-copy): Fix docstring. (tramp-skeleton-set-file-modes-times-uid-gid): New defmacro. (tramp-skeleton-write-region): Set "file-exists-p" cache property. (tramp-handle-file-exists-p): Use cached value. (tramp-process-sentinel): Flush "/". (tramp-make-tramp-temp-file): Suppress also `tramp-smb-remote-acl-p'. (tramp-get-connection-buffer): * test/lisp/net/tramp-tests.el (tramp-test10-write-region) (tramp-test20-file-modes, tramp-test22-file-times): Extend tests.
* Remove Tramp instrumentationMichael Albinus2022-07-271-12/+3
|
* Further Tramp instrumentationMichael Albinus2022-07-271-1/+1
| | | | | ; * test/infra/test-jobs.yml (test-lisp-net-inotify): ; Revert instrumentation.
* ; Instrument Tramp testsMichael Albinus2022-07-271-1/+9
| | | | | ; * test/infra/test-jobs.yml (test-lisp-net-inotify): Run expensive. ; * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Instrument.
* ; * test/lisp/net/tramp-tests.el (tramp--test-enabled): fix regexpMattias Engdegård2022-07-251-1/+1
|
* Fix regexp in tramp-tests.elMichael Albinus2022-07-251-1/+1
| | | | | * test/lisp/net/tramp-tests.el (tramp--test-enabled): Fix regexp for Tramp test files.
* ; Instrument tramp-tests.elMichael Albinus2022-07-251-1/+2
|
* Refactor TrampMichael Albinus2022-07-242-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Use `tramp-adb-handle-get-remote-gid' and `tramp-adb-handle-get-remote-uid'. (tramp-adb-handle-file-attributes): Use `tramp-convert-file-attributes'. (tramp-do-parse-file-attributes-with-ls): Remove ID-FORMAT. (tramp-adb-handle-directory-files-and-attributes): Use `tramp-skeleton-directory-files-and-attributes'. (tramp-adb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-adb-handle-copy-file, tramp-adb-handle-rename-file): Use `tramp-barf-if-file-missing'. (tramp-adb-handle-get-remote-uid) (tramp-adb-handle-get-remote-gid): New defuns. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Use `tramp-archive-handle-directory-files'. (tramp-archive-handle-directory-files): New defun. * lisp/net/tramp-cache.el (tramp-file-property-p): New defun. * lisp/net/tramp-compat.el (tramp-compat-take): New defalias. * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-crypt-handle-directory-files): Use `tramp-skeleton-directory-files'. * lisp/net/tramp-fuse.el (tramp-fuse-handle-directory-files): Use `tramp-skeleton-directory-files'. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. * lisp/net/tramp-sh.el (tramp-readlink-file-truename) (tramp-stat-file-attributes) (tramp-stat-directory-files-and-attributes): New defconsts. (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Adapt. (tramp-sh-handle-make-symbolic-link): Flush TARGET file properties. (tramp-sh-handle-file-truename): Use `tramp-readlink-file-truename' (tramp-sh-handle-file-exists-p) (tramp-sh-handle-file-executable-p) (tramp-sh-handle-file-readable-p) (tramp-sh-handle-file-directory-p) (tramp-sh-handle-file-writable-p): Adapt check of file properties. (tramp-sh-handle-file-attributes): Simplify. (tramp-do-file-attributes-with-ls): Remove ID-FORMAT. Combine two remote commands. Compute both versions of uid and gid together. (tramp-do-file-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-perl): Remove ID-FORMAT. (tramp-do-file-attributes-with-stat): Remove ID-FORMAT. Use `tramp-stat-file-attributes'. (tramp-sh-handle-directory-files-and-attributes): Use `tramp-skeleton-directory-files-and-attributes'. (tramp-do-directory-files-and-attributes-with-stat): Remove ID-FORMAT. Use `tramp-stat-directory-files-and-attributes'. (tramp-sh-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-sh-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-sh-handle-write-region): Combine two remote commands. (tramp-sh-gio-monitor-process-filter): Simplify `cond' call. (tramp-expand-script): Extend for ls, readling and stat. (tramp-open-connection-setup-interactive-shell): Do not set `tramp-end-of-output'. (tramp-open-connection-setup-interactive-shell): Do not send prompt formatting command, it's superfluous. (tramp-send-command-and-check): Rearrange in order to accept also heredoc scripts. (tramp-convert-file-attributes): Move function to tramp.el. (tramp-get-remote-id): Set connection property. (tramp-get-remote-uid-with-id): Use it. (tramp-get-remote-python): Don't check for python2 anymore. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use `tramp-handle-directory-files'. (tramp-smb-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-smb-handle-directory-files): Remove. (tramp-smb-handle-file-attributes): Use `tramp-convert-file-attributes'. (tramp-smb-do-file-attributes-with-stat): Remove ID-FORMAT. (tramp-smb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-sudoedit-file-attributes): New defconst. (tramp-sudoedit-handle-file-attributes): Simplify code. * lisp/net/tramp.el (tramp-setup-debug-buffer): Set debug buffer as not modified. (tramp-barf-if-file-missing, tramp-skeleton-copy-directory) (tramp-skeleton-directory-files) (tramp-skeleton-directory-files-and-attributes) (tramp-skeleton-file-local-copy): New macros. (tramp-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-handle-directory-files): Use `tramp-skeleton-directory-files'. (tramp-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-handle-insert-file-contents): Use `tramp-barf-if-file-missing'. (tramp-get-process-attributes, tramp-action-out-of-band): Simplify `cond' call. (tramp-check-cached-permissions): Simplify. (tramp-make-tramp-temp-file): Reimplement. * test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit): Don't set. * test/lisp/net/tramp-tests.el (tramp--test-enabled): Remove superfluous test files. (tramp-test21-file-links): Protect file name deletion.
* Fix srcset parsing in shrLars Ingebrigtsen2022-07-231-0/+15
| | | | | | * lisp/net/shr.el (shr--preferred-image): Factor out srcset parsing for easier testing. (shr--parse-srcset): Don't misparse URLs with commas in them.
* Merge from origin/emacs-28Stefan Kangas2022-07-201-6/+6
|\ | | | | | | | | | | | | cb911febc6 ; Fix typos # Conflicts: # test/lisp/net/tramp-tests.el
| * ; Fix typosStefan Kangas2022-07-191-6/+6
| |
| * Fix file name quoting in tramp-smb.el (do not merge)Michael Albinus2022-06-091-11/+1
| | | | | | | | | | | | | | | | * lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Quote tmpfile. (tramp-smb-get-localname): Remove superfluous test. (Bug#55855) * test/lisp/net/tramp-tests.el (tramp-test03-file-name-method-rules): Remove superfluous checks.
* | Adapt Tramp new test macrosMichael Albinus2022-07-181-0/+3
| | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat) (tramp--test-deftest-with-perl, tramp--test-deftest-with-ls): Skip for all methods but those from tramp-sh.el.
* | Comment docstrings in tramp-test macrosMichael Albinus2022-07-161-22/+12
| | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat) (tramp--test-deftest-with-perl, tramp--test-deftest-with-ls) (tramp--test-deftest-direct-async-process): Comment docstring, it doesn't work this way. Use `tramp-test-vec' if appropriate.
* | Extend tramp-testsMichael Albinus2022-07-151-172/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat) (tramp--test-deftest-with-perl, tramp--test-deftest-with-ls): New defmacros. (tramp-test18-file-attributes-with-stat) (tramp-test18-file-attributes-with-perl) (tramp-test18-file-attributes-with-ls) (tramp-test19-directory-files-and-attributes-with-stat) (tramp-test19-directory-files-and-attributes-with-perl) (tramp-test19-directory-files-and-attributes-with-ls): New tests. (tramp-test21-file-links): Delete also `tmp-name2'. (tramp--test-deftest-direct-async-process): Rename from `tramp--test--deftest-direct-async-process'. Remove DOCSTRING. Adapt callees. (tramp--test-special-characters): Remove. Move body to ... (tramp-test41-special-characters): ... here. (tramp--test-utf8): Remove. Move body to ... (tramp-test42-utf8): ... here. (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls) (tramp-test42-utf8-with-stat) (tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls): Rewrite, using the new macros.
* | Fix Tramp test environment on hydra.nixos.orgMichael Albinus2022-07-101-5/+6
| | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (tramp-remote-path): Declare. Adapt `tramp-remote-path' on hydra. (Bug#56424) * test/lisp/dnd-tests.el (dnd-tests-begin-drag-files): Remove instrumentation. * test/lisp/filenotify-tests.el: * test/lisp/shadowfile-tests.el: * test/lisp/net/tramp-tests.el: Do not adapt `tramp-remote-path'.
* | Drop support for the dead third-party w3 packageStefan Kangas2022-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The w3 package was removed from GNU ELPA in 2020 as it doesn't run on a recent Emacs, and development had stopped over a decade before that. If anyone wants to revive the w3 package, they should look this all over, but it doesn't make sense for us to maintain this support code. Ref: https://debbugs.gnu.org/25395 * lisp/net/browse-url.el (browse-url-w3): Make obsolete. (browse-url--browser-defcustom-type) (browse-url-default-browser): * lisp/ffap.el (ffap-url-at-point, ffap-file-at-point): * lisp/net/newst-plainview.el (newsticker--buffer-do-insert-text): * lisp/net/newst-reader.el (newsticker-html-renderer) (newsticker-show-news): * lisp/net/newst-treeview.el (newsticker--treeview-render-text): * lisp/org/ol.el (org-store-link): * lisp/url/url.el (url-retrieve): Remove w3 support code and related documentation and comments. (Bug#56435) * test/lisp/net/browse-url-tests.el (browse-url-tests-browser-kind): Adjust test for above changes. * etc/TODO: Remove TODO to install W3. * doc/misc/org.org (Handling Links): Don't mention W3. * lisp/msb.el (msb--few-menus, msb--very-many-menus): Check for eww-mode instead of w3-mode.
* | Tramp code cleanupMichael Albinus2022-07-031-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-get-connection-property): Make DEFAULT optional. Adapt callees. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-compat.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sshfs.el: * lisp/net/trampver.el: Code cleanup. * test/lisp/net/tramp-tests.el (tramp--test-sh-no-ls--dired-p) (tramp--test-with-proper-process-name-and-buffer): Code cleanup.
* | Fix Tramp testMichael Albinus2022-06-161-11/+1
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test03-file-name-method-rules): Remove superfluous checks.
* | Adjust browse-url test after previous browse-url changeLars Ingebrigtsen2022-06-091-1/+1
| |
* | Factor out test configuration for remote filesMichael Albinus2022-06-081-143/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (tramp-methods) (tramp-default-host-alist): Declare. (ert-remote-temporary-file-directory): New defconst. * test/README: Mention dnd-tests.el. * test/lisp/autorevert-tests.el (auto-revert-test-remote-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'. * test/lisp/dnd-tests.el (ert-x): Require. (dnd-tests-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'. * test/lisp/filenotify-tests.el (file-notify-test-remote-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'. * test/lisp/shadowfile-tests.el (ert-x): Require. (shadow-test-remote-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'. * test/lisp/net/tramp-tests.el: Don't require ert. (ert-remote-temporary-file-directory): Define if it doesn't exist. (tramp-test-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'.
* | Fix Tramp testMichael Albinus2022-06-031-0/+1
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test31-signal-process): Skip on MS Windows.
* | Merge from origin/emacs-28Stefan Kangas2022-05-301-0/+1
|\| | | | | | | 1b7b69e764 Some Tramp cleanup on MS Windows
| * Some Tramp cleanup on MS WindowsMichael Albinus2022-05-291-0/+1
| | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-restricted-shell-hosts-alist): Do not add localhost when `tramp-encoding-shell' is a POSIX shell. * test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process): Skip on MS Windows.
| * Fix Tramp sshfs tests (don't merge)Michael Albinus2022-05-171-5/+11
| | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare. (tramp-test16-directory-files) (tramp-test16-file-expand-wildcards) (tramp-test26-file-name-completion, tramp--test-check-files): Use it. (tramp--test-check-files): Delete directory recursively.
| * * test/lisp/net/tramp-tests.el (tramp-test27-load): Adapt test. Don't mergeMichael Albinus2022-05-151-1/+3
| |
* | Some cleanups in tramp-tests.elMichael Albinus2022-05-211-13/+17
| | | | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare. (tramp-test16-directory-files) (tramp-test16-file-expand-wildcards) (tramp-test26-file-name-completion, tramp--test-check-files): Use it. (tramp--test-check-files): Delete directory recursively. (tramp-test43-file-system-info): Make test more robust.
* | ; Fix typosStefan Kangas2022-05-151-2/+2
| |
* | Improve handling of `tramp-set-file-uid-gid'Michael Albinus2022-05-111-1/+3
| | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-skeleton-write-region): Call `tramp-set-file-uid-gid' properly. (tramp-set-file-uid-gid): Handle also `tramp-crypt-file-name-handler'. * test/lisp/net/tramp-tests.el (tramp-test27-load): Adapt test.
* | Improve Tramp testsMichael Albinus2022-05-091-18/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): Handle compressed files. * lisp/net/tramp.el (tramp-skeleton-write-region): Handle encrypted VISIT file. (tramp-get-process-attributes): Add backward compatibility. * test/lisp/net/tramp-tests.el (with-connection-local-variables): Declare. (auto-save-file-name-transforms): Don't declare. (ert-resource-directory-format) (ert-resource-directory-trim-left-regexp) (ert-resource-directory-trim-right-regexp, ert-resource-directory) (ert-resource-file): Define if they don't exist. (tramp-test10-write-region-file-precious-flag) (tramp-test10-write-region-other-file-name-handler) (tramp-test31-interrupt-process, tramp-test31-signal-process) (tramp--test-async-shell-command) (tramp-test34-connection-local-variables) (tramp-test39-make-lock-file-name) (tramp-test39-detect-external-change): Extend tests.
* | Add Tramp testMichael Albinus2022-05-052-10/+50
| | | | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tar-mode): Require. (tramp-test10-write-region-other-file-name-handler): New test. (tramp-test31-interrupt-process, tramp-test31-signal-process): Tag them :unstable unconditionally. * test/lisp/net/tramp-resources/foo.tar.gz: New resource file.
* | Improve tramp-test46-read-passwordMichael Albinus2022-04-271-2/+6
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test46-read-password): Add a further check.
* | ; Instrument tramp-test46-read-passwordMichael Albinus2022-04-271-2/+3
| |
* | Add test for Tramp password handlingMichael Albinus2022-04-252-7/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-error-show-message-timeout): New defvar. (tramp-error-with-buffer, tramp-user-error): Use it. * test/lisp/net/tramp-tests.el (tramp-error-show-message-timeout): Set it to nil. (tramp-test46-read-password): New test. (tramp-test47-auto-load, tramp-test47-delay-load) (tramp-test47-recursive-load, tramp-test47-remote-load-path) (tramp-test48-unload): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test47-auto-load) (tramp-archive-test47-delay-load): Rename.
* | Merge from origin/emacs-28Eli Zaretskii2022-04-161-22/+25
|\| | | | | | | | | | | | | | | | | 84a2857722 Fix scrolling of the stack window in Calc 9dd44505b1 ; * src/window.c (Fset_window_start): Clarify the effect o... 24a6c7c8c0 Update and fix instructions and scripts for updating the W... 886339747b Extend tramp-archive-test45-auto-load ff997ad786 Ensure local `default-directory' in Tramp when needed 4f27588a16 Clarify "idleness" in the ELisp manual
| * Extend tramp-archive-test45-auto-loadMichael Albinus2022-04-081-22/+25
| | | | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load): Extend test.