summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* Check link text domain suspiciousnessLars Ingebrigtsen2022-01-201-1/+3
| | | | | * lisp/international/textsec.el (textsec-link-suspicious-p): Check whether the domain in the link text is suspicious.
* Expand textsec-link-suspicious-p checkingLars Ingebrigtsen2022-01-201-1/+7
| | | | | * lisp/international/textsec.el (textsec-link-suspicious-p): Check the text more thoroughly for link-like things.
* Improve textsec-domain-suspicious-p messageLars Ingebrigtsen2022-01-201-0/+4
| | | | | | * lisp/international/textsec.el (textsec-domain-suspicious-p): Ensure that we're not confusing the user if there's a directional override in the string we're checking.
* Make textsec-mixed-numbers-p actually workLars Ingebrigtsen2022-01-191-0/+1
| | | | | * lisp/international/textsec.el (textsec-mixed-numbers-p): Fix the test.
* Add text for suspicious linksLars Ingebrigtsen2022-01-191-0/+18
| | | | | | | | | | * lisp/international/textsec-check.el (textsec-check): Note `link'. (textsec-propertize): Fix typo. * lisp/international/textsec.el (textsec-link-suspicious-p): New function. * lisp/net/shr.el (shr-tag-a): Check for sus links.
* Make shr mark links with suspicious URLsLars Ingebrigtsen2022-01-191-0/+4
| | | | | | | | | | | * lisp/international/textsec-check.el (textsec-propertize): New function. (textsec-check): Only check, don't alter STRING. * lisp/international/textsec.el (textsec-url-suspicious-p): New function. * lisp/net/shr.el (shr-tag-a): Mark suspicious links.
* Add new file textsec-check.elLars Ingebrigtsen2022-01-191-5/+10
| | | | | | * lisp/international/textsec-check.el: New file. * lisp/international/textsec.el (textsec-email-address-header-suspicious-p): Rename.
* Mark whole-script confusables as suspicious domainsLars Ingebrigtsen2022-01-191-1/+4
| | | | | | | * lisp/international/textsec.el (textsec-domain-suspicious-p): Consider domain names that are whole-script confusables with ASCII to be suspicious. (I think this is what the Unicode standard is recommending, but I'm not 100% sure.)
* Split textsec-email-address-suspicious-p into two functionsLars Ingebrigtsen2022-01-191-1/+3
| | | | | | * lisp/international/textsec.el (textsec-email-address-suspicious-p): Made into its own function. (textsec-email-suspicious-p): Use it and adjust doc strings.
* Make textsec-suspicious-nonspacing-p work on marksLars Ingebrigtsen2022-01-191-3/+3
| | | | | | * lisp/international/textsec.el (textsec-suspicious-nonspacing-p): We're only interested in nonspacing marks, not control characters in this test.
* cl-generic-tests.el: Fix warningStefan Monnier2022-01-181-1/+1
| | | | | * test/lisp/emacs-lisp/cl-generic-tests.el (ert): Require at run-time for `ert--get-explainer`.
* VC: Fix tests for SCCS and MtnStefan Monnier2022-01-181-10/+21
| | | | | | | * test/lisp/vc/vc-tests.el: Prefer closures to `(lambda ...). (vc-test-mtn05-rename-file, vc-test-mtn06-version-diff): Skip. * lisp/vc/vc.el (vc-responsible-backend): Fix vc-test--register on SCCS.
* Add textsec functions for verifying email addressesLars Ingebrigtsen2022-01-181-0/+39
| | | | | | | | | | | * lisp/international/characters.el (bidi-control-characters): Rename from glyphless--bidi-control-characters for use in textsec, and add LRM/RLM/ALM. (update-glyphless-char-display): Adjust the code. * lisp/international/textsec.el (textsec-local-address-suspicious-p) (textsec-name-suspicious-p, textsec-suspicious-nonspacing-p) (textsec-email-suspicious-p): New functions.
* Add textsec-domain-suspicious-pLars Ingebrigtsen2022-01-183-0/+6355
| | | | | | | | | | | | | | * .gitignore: Ignore idna-mapping.el. * admin/notes/unicode: Note idna-mapping file. * admin/unidata/IdnaMappingTable.txt: New file. * admin/unidata/Makefile.in (all): Generate idna-mapping.el. * admin/unidata/unidata-gen.el (unidata-gen-idna-mapping): Generate. * lisp/international/textsec.el (textsec-domain-suspicious-p): New function.
* Morka handling of multi-hops in Tramp more consistentMichael Albinus2022-01-181-84/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-make-tramp-file-name): Adapt argument list. Add hops to `tramp-default-proxies-alist'. (tramp-find-foreign-file-name-handler): Adapt argument list. (tramp-handle-abbreviate-file-name): Abbreviate multi-hops. (tramp-handle-file-remote-p): Adapt handling of hops. (tramp-add-hops): New defun. (tramp-compute-multi-hops): Use it. * lisp/net/tramp.el (tramp-make-tramp-hop-name, tramp-get-buffer) (tramp-file-name-handler, tramp-handle-file-truename) (tramp-handle-insert-file-contents, tramp-local-host-p) (tramp-read-passwd, tramp-clear-passwd): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name) (tramp-archive-gvfs-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-make-process, tramp-sh-handle-process-file) (tramp-sh-file-name-handler-p, tramp-get-remote-path): * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename): Adapt callees. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test07-abbreviate-file-name): Adapt tests.
* Add textsec predicates for different types of confusabilityLars Ingebrigtsen2022-01-181-1/+18
| | | | | | | * lisp/international/textsec.el (textsec-resolved-script-set) (textsec-single-script-confusable-p) (textsec-mixed-script-confusable-p) (textsec-whole-script-confusable-p): New functions.
* Add textsec support for confusable charactersLars Ingebrigtsen2022-01-181-0/+7
| | | | | | | | | | | | | | | | * admin/notes/unicode: Note the confusables.txt file. * admin/unidata/Makefile.in (${unidir}/uni-confusable.el): Generate the confusable file. * admin/unidata/README (https): Add confusables.txt. * admin/unidata/confusables.txt: New file. * admin/unidata/unidata-gen.el (unidata-gen-confusable): Parse the confusables.txt file. * lisp/international/textsec.el (textsec-ascii-confusable-p) (textsec-unconfuse-string): New functions.
* Add new function textsec-mixed-numbers-pLars Ingebrigtsen2022-01-171-0/+5
| | | | | * lisp/international/textsec.el (textsec-mixed-numbers-p): New function.
* Add textsec-restriction-level functionLars Ingebrigtsen2022-01-171-0/+12
| | | | | * lisp/international/textsec.el (textsec-restriction-level): New function.
* Add support for functions that deal with Unicode scriptsLars Ingebrigtsen2022-01-171-0/+72
| | | | | | | | | | | | | | | | | | | * admin/unidata/Makefile.in (${unidir}/uni-scripts.el): Build uni-scripts.el. * admin/unidata/Scripts.txt: * admin/unidata/ScriptExtensions.txt: * admin/unidata/PropertyValueAliases.txt: New files from Unicode. * admin/unidata/README: Update. * admin/unidata/unidata-gen.el (unidata-gen-charprop): Allow writing other data, too. (unidata-gen-scripts, unidata-gen--read-script-aliases) (unidata-gen--insert-file): New functions to parse the Script* files. * lisp/international/textsec.el: Implement some functions that work on scripts.
* Move the Gnus range functions to a new range.el fileLars Ingebrigtsen2022-01-171-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/range.el: New file. * lisp/gnus/gnus-agent.el (range): (gnus-agent-synchronize-group-flags): (gnus-agent-possibly-alter-active): (gnus-agent-fetch-headers): (gnus-agent-read-agentview): (gnus-agent-fetch-group-1): (gnus-agent-read-p): (gnus-agent-expire-group-1): (gnus-agent-retrieve-headers): Adjust callers. * lisp/gnus/gnus-art.el (range): (gnus-article-describe-bindings): * lisp/gnus/gnus-cloud.el (range): (gnus-cloud-available-chunks): * lisp/gnus/gnus-draft.el (gnus-group-send-queue): * lisp/gnus/gnus-group.el (range): (gnus-group-line-format-alist): (gnus-number-of-unseen-articles-in-group): (gnus-group-update-eval-form): (gnus-group-read-group): (gnus-group-delete-articles): (gnus-group-catchup): (gnus-group-expire-articles-1): (gnus-add-marked-articles): * lisp/gnus/gnus-int.el (gnus-request-marks): * lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal): * lisp/gnus/gnus-range.el (gnus-range-difference) (gnus-sorted-range-intersection, gnus-uncompress-range) (gnus-add-to-range, gnus-remove-from-range) (gnus-member-of-range, gnus-list-range-intersection) (gnus-list-range-difference, gnus-range-length, gnus-range-add) (gnus-range-map): Make into obsolete aliases. * lisp/gnus/gnus-start.el (gnus-make-articles-unread): (gnus-convert-old-ticks): (gnus-read-old-newsrc-el-file): * lisp/gnus/gnus-sum.el (gnus-select-newsgroup): (gnus-articles-to-read): (gnus-articles-to-read): (gnus-killed-articles): (gnus-adjust-marked-articles): (gnus-update-marks): (gnus-update-marks): (gnus-compute-read-articles): (gnus-list-of-read-articles): (gnus-summary-update-info): (gnus-summary-move-article): (gnus-summary-expire-articles): (gnus-update-read-articles): (gnus-summary-insert-old-articles): (gnus-summary-insert-old-articles): (gnus-summary-insert-old-articles): * lisp/gnus/mail-source.el (gnus-range): (gnus-compress-sequence): * lisp/gnus/nnheader.el (range): (gnus-range-add): (nnheader-update-marks-actions): * lisp/gnus/nnimap.el (nnimap-update-info): (nnimap-update-info): (nnimap-update-info): (nnimap-update-qresync-info): (nnimap-update-qresync-info): (nnimap-update-qresync-info): (nnimap-parse-copied-articles): * lisp/gnus/nnmaildir.el (nnmaildir-request-update-info): (nnmaildir-request-update-info): (nnmaildir-request-expire-articles): (nnmaildir-request-expire-articles): (nnmaildir-request-set-mark): * lisp/gnus/nnmairix.el (nnmairix-request-set-mark): * lisp/gnus/nnmbox.el (nnmbox-record-active-article): (nnmbox-record-deleted-article): * lisp/gnus/nnml.el (nnml-request-compact-group): * lisp/gnus/nnvirtual.el (nnvirtual-request-expire-articles): * lisp/gnus/nnselect.el (numbers-by-group): (nnselect-request-update-info): (nnselect-push-info):
* Improve handling of INFILE in tramp*-process-file (Bug#53284)Michael Albinus2022-01-171-1/+13
| | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-process-file): * lisp/net/tramp-sh.el (tramp-sh-handle-process-file): * lisp/net/tramp-smb.el (tramp-smb-handle-process-file): * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): Improve handling of INFILE. Fix thinko using `process-file-side-effects'. (Bug#53284) * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Use `tramp-sshfs-handle-set-file-times'. (tramp-sshfs-handle-set-file-times): New defun. * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Extend test.
* Add some more mailcap tests.Tassilo Horn2022-01-163-0/+80
| | | | | | | | | | | * test/lisp/net/mailcap-resources/mailcap: New file. * test/lisp/net/mailcap-resources/test.test: New file. * test/lisp/net/mailcap-tests.el (with-pristine-mailcap): New macro. (mailcap-parsing-and-mailcap-mime-info): New test for parsing mailcap files and selecting the right viewer. (mailcap--test-result): New variable. (mailcap--test-viewer): New function. (mailcap-view-file): New test for mailcap-view-file.
* Skip ffap test on some systemsLars Ingebrigtsen2022-01-141-0/+2
|
* Don't have ffap interpret ":/bin" as the current directoryLars Ingebrigtsen2022-01-141-0/+15
| | | | | * lisp/ffap.el (ffap-file-at-point): Don't interpret :/bin as the current directory (bug#52441).
* spelling-tests.el: use ert-with-temp-directoryRobert Pluim2022-01-141-3/+3
| | | | | | | * test/lisp/so-long-tests/spelling-tests.el (so-long-spelling): Use ;ert-with-temp-directory' instead of passing :directory to 'ert-with-temp-file', and restore the prefix/suffix values used originally with 'make-temp-file'.
* spelling-tests.el: ignore errors when checking for ispellRobert Pluim2022-01-141-6/+5
| | | | | | | | | | ispell-valid-dictionary-list can signal an error, eg when the local hunspell installation cannot find any dictionaries, so it's best to ignore that error. * test/lisp/so-long-tests/spelling-tests.el (so-long-spelling): Wrap ispell check in ignore-errors, as ispell-valid-dictionary-list can signal an error.
* Merge from origin/emacs-28Stefan Kangas2022-01-141-0/+10
|\ | | | | | | | | 34ca4ff9a5 Fix Edebug specification for inline functions (Bug#53068). 3c06c37a8b Remove mention of removed `gnus-treat-play-sounds' variabl...
| * Fix Edebug specification for inline functions (Bug#53068).Philipp Stephani2022-01-131-0/+10
| | | | | | | | | | | | | | * lisp/emacs-lisp/inline.el (inline-quote): Fix Edebug specification. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-inline): New unit test.
* | ; * test/lisp/progmodes/flymake-tests.el: remove duplicate functionMattias Engdegård2022-01-131-5/+0
| |
* | spelling-tests.el: actually create a temp directoryRobert Pluim2022-01-131-0/+1
| | | | | | | | | | | | | | | | | | This test was creating a file, but actually needs a directory, and fails otherwise. * test/lisp/so-long-tests/spelling-tests.el (so-long-spelling): Pass the :directory arg to ert-with-temp-file so we actually create a directory.
* | Make ert explainers work on function aliasesLars Ingebrigtsen2022-01-131-0/+3
| | | | | | | | | | * lisp/emacs-lisp/ert.el: New function. (ert--expand-should-1): Use it (bug#53178).
* | Avoid infloops in help-fns--analyze-function with aliasesLars Ingebrigtsen2022-01-131-0/+9
| | | | | | | | | | * lisp/help-fns.el (help-fns--analyze-function): Use function-alias-p to avoid infloops.
* | Add new function function-alias-pLars Ingebrigtsen2022-01-131-0/+17
| | | | | | | | | | * doc/lispref/functions.texi (Defining Functions): Document it. * lisp/subr.el (function-alias-p): New function (bug#53178).
* | Merge remote-tracking branch 'origin/emacs-28' into trunkStefan Monnier2022-01-121-0/+5
|\|
| * Revert "Fix closure-conversion of shadowed captured lambda-lifted vars"Mattias Engdegård2022-01-122-195/+0
| | | | | | | | | | | | | | This reverts commit 3ec8c8b3ae2359ceb8135b672e86526969c16b7e. It was committed to a stable branch without prior discussion; see bug#53071.
| * Fix closure-conversion of shadowed captured lambda-lifted varsMattias Engdegård2022-01-122-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lambda-lifted variables (ones passed explicitly to lambda-lifted functions) that are also captured in an outer closure and shadowed were renamed incorrectly (bug#51982). Reported by Paul Pogonyshev. * lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New. (cconv-convert): Provide correct definiens for the closed-over variable. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all) (cconv-closure-convert-remap-var): Add tests. (cherry picked from commit 45252ad8f932c98a373ef0ab7f3363a3e27ccbe4)
| * Fix test lisp/cedet/semantic/bovine/gcc-tests on macOS (Bug#52431)Philipp Stephani2022-01-121-2/+3
| | | | | | | | | | | | | | | | * test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test-output-parser-this-machine): Also detect Apple clang on macOS Monterey. (cherry picked from commit 6e52becfbe2a33c025b8c4838b3c8f06ba5a6fb8)
| * Don't fail flymake-tests if `gcc` actually is ClangMattias Engdegård2022-01-121-1/+9
| | | | | | | | | | | | | | | | * test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang) (different-diagnostic-types, included-c-header-files): Skip tests that depend on the `gcc` command really being GCC and not Clang. (cherry picked from commit b2167d98432a78442522b7564e22f47d75a98b6f)
* | Follow POSIX/GNU argument conventions for 'eshell-eval-using-options'Jim Porter2022-01-121-39/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/esh-opt.el (eshell--split-switch): New function. (eshell-set-option): Allow setting a supplied value instead of always consuming from 'eshell--args'. (eshell--process-option): Support consuming option values specified as a single token. (eshell--process-args): For short options, pass full switch token to 'eshell--process-option'. * test/lisp/eshell/esh-opt-tests.el (esh-opt-process-args-test): Fix test. (test-eshell-eval-using-options): Add tests for various types of options. * doc/misc/eshell.texi (Defining new built-in commands): New subsection, describe how to use 'eshell-eval-using-options'. * etc/NEWS: Announce the change.
* | Merge from origin/emacs-28Stefan Kangas2022-01-111-22/+37
|\| | | | | | | 8db5f82d45 ; Fix tabulated-list-mode tests after revert
| * ; Fix tabulated-list-mode tests after revertStefan Kangas2022-01-111-22/+37
| | | | | | | | | | * test/lisp/emacs-lisp/tabulated-list-tests.el (tabulated-list-print, tabulated-list-sort): Fix tests.
* | (files-tests--with-buffer-offer-save): Turn it into a functionStefan Monnier2022-01-101-48/+43
| | | | | | | | | | | | | | * test/lisp/files-tests.el (files-tests--with-buffer-offer-save): Turn it into a function. (files-tests-save-buffers-kill-emacs--asks-to-save-buffers) (files-tests-buffer-offer-save): Adjust calls accordingly
* | Merge remote-tracking branch 'origin/emacs-28' into trunkStefan Monnier2022-01-101-1/+1
|\|
| * (save-some-buffers): Simplify the fix for bug#46374Stefan Monnier2022-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | * lisp/files.el (save-some-buffers): Only check the `save-some-buffers-function` property on functions from `save-some-buffers-default-predicate` since callers which provide a `pred` argument can arrange to compute `pred` themselves if needed. * test/lisp/files-tests.el (files-tests-buffer-offer-save): Don't test with `pred` set to `save-some-buffers-root` since it's not an appropriate function for that any more.
* | Use 'auth-info-password' in testsSam Steingold2022-01-101-24/+6
| | | | | | | | | | | | | | * test/lisp/auth-source-tests.el (auth-source-test-searches): (auth-source-test-secrets-create-secret): (auth-source-test-netrc-create-secret, auth-source-delete): Use 'auth-info-password' instead of ad hoc code.
* | New minor mode elide-head-modeStefan Kangas2022-01-091-14/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/elide-head.el (elide-head-mode): New minor mode. (Bug#52980) (elide-head--delete-overlay, elide-head--show) (elide-head--hide): New functions factored out from ... (elide-head, elide-head-show): ... here. Make obsolete in favor of elide-head-mode. (elide-head-headers-to-hide): Doc fix. * test/lisp/elide-head-tests.el (ert-x): Require. (elide-head-tests-elide-head-mode) (elide-head-tests-elide-head-mode/enable-disable) (elide-head-tests-elide-head-mode/normal-mode) (elide-head-tests-elide-head-mode/revert-buffer): New tests. (elide-head--add-test): Update test to use elide-head-mode. (elide-head-tests-elide-head) (elide-head-tests-elide-head-with-prefix-arg) (elide-head-tests-show): Make obsolete.
* | Improve pp-emacs-lisp-code for #'Lars Ingebrigtsen2022-01-041-0/+6
| | | | | | | | | | * lisp/emacs-lisp/pp.el (pp--insert-lisp): Format (function ...) as #'.
* | Prevent further cases of duplicated separators in context menusJim Porter2022-01-041-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, context menu items are added before the overall prompt string. This could cause multiple consecutive separators to appear if they "surround" the prompt string. (Bug#52293) * lisp/mouse.el (context-menu-map): Improve the de-duplication logic to ignore non-menu-items when checking for consecutive separators. * test/lisp/mouse-tests.el (context-menu-map-remove-consecutive-separators) (context-menu-map-remove-separators-at-beginning-or-end): New tests.
* | Test that buffer exists in shortdoc-all-groups-workStefan Kangas2022-01-041-4/+7
| | | | | | | | | | * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-all-groups-work): Test that the shortdoc buffer was created.