summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | New test shortdoc-all-groups-workStefan Kangas2022-01-031-0/+8
| | | | | | | | | | * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-all-groups-work): New test. See Bug#52969.
* | elide-head: Make GPL regexp more forgivingStefan Kangas2022-01-031-0/+105
| | | | | | | | | | | | | | | | | | | | | | * lisp/elide-head.el (elide-head-headers-to-hide): Make GPL regexp more forgiving. * test/lisp/elide-head-tests.el (elide-head--add-test): New macro. (elide-head--test-headers-to-hide/gpl2-1) (elide-head--test-headers-to-hide/gpl3-1) (elide-head--test-headers-to-hide/gpl3-2) (elide-head--test-headers-to-hide/gpl3-3) (elide-head--test-headers-to-hide/gpl3-4): New tests.
* | Silence byte-compiler in eieio testsStefan Kangas2022-01-032-2/+6
| | | | | | | | | | | | | | | | This is a temporary workaround for Bug#52971. * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el (eieio-compat) * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-compat): Silence byte-compiler by wrapping require in with-no-warnings.
* | Don't fail flymake-tests if `gcc` actually is ClangMattias Engdegård2022-01-021-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.
* | Merge from origin/emacs-28Stefan Kangas2022-01-021-1/+1
|\| | | | | | | | | | | | | efb1c7ec37 ; * admin/notes/years: More known problems. f475c5823a ; Copyright year fixes 2684def348 ; Run set-copyright from admin.el 2558b37b5e ; * admin/notes/years: Mention known problems with 'update...
| * ; Copyright year fixesGlenn Morris2022-01-011-1/+1
| |
* | ; Add 2022 to copyright years.Eli Zaretskii2022-01-0110-10/+10
| |
* | Merge from origin/emacs-28Eli Zaretskii2022-01-01354-354/+355
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01354-354/+355
| |
* | Properly report errors about unbound ERT test symbols.Philipp Stephani2021-12-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Assertions should only be used to check internal consistency within a package, not to check arguments passed by callers. Instead, define and use a new error symbol. * lisp/emacs-lisp/ert.el (ert-test-unbound): New error symbol. (ert-select-tests): Use it. * test/lisp/emacs-lisp/ert-tests.el (ert-test-select-undefined): New unit test. * etc/NEWS: Document new behavior.
* | Fix multisession-tests on MS-WindowsEli Zaretskii2021-12-301-3/+4
| | | | | | | | | | | | | | * test/lisp/emacs-lisp/multisession-tests.el (multi-test-files-simple): On MS-Windows and Haiku, wait before invoking the Emacs sub-process, not after, to ensure the later update is detected with 1-sec file time resolution.
* | Make multi-test-files-busy shorterLars Ingebrigtsen2021-12-291-4/+4
| |
* | Adjust multi-test-files-simple test for WindowsLars Ingebrigtsen2021-12-291-0/+3
| | | | | | | | | | | | * test/lisp/emacs-lisp/multisession-tests.el (multi-test-files-simple): Adjust test to Emacs timestamp resolution on Windows.
* | Fix test lisp/cedet/semantic/bovine/gcc-tests on macOS (Bug#52431)Philipp Stephani2021-12-281-1/+1
| | | | | | | | | | | | * test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test-output-parser-this-machine): Also detect Apple clang on macOS Monterey.
* | Fix read-multiple-choice testsStefan Kangas2021-12-281-5/+5
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Fix typo. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description) (test-rmc--add-key-description/with-attributes) (test-rmc--add-key-description/non-graphical-display): Fix tests.
* | Fix EIEIO tests to account for eieio-compat moveStefan Monnier2021-12-272-0/+2
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el: * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Require `eieio-compat` explicitly. * test/manual/cedet/tests/test.el (a-method, a-generic): * doc/misc/srecode.texi (Compound Dictionary Values): * doc/misc/ede.texi (ede-generic-project): Update sample code to use cl-generic syntax.
* | The temprary "session" collection might not exist in Secret ServiceMichael Albinus2021-12-271-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/auth.texi (Secret Service API): * test/lisp/net/secrets-tests.el (secrets--test-delete-all-session-items) (secrets-test02-collections, secrets-test03-items) (secrets-test04-search): The temporary "session" collection might not exist. * lisp/net/secrets.el (secrets-struct-secret-content-type): Remove compatibility hack. (secrets-create-item): Adapt accordingly.
* | Use `permission-denied' in Tramp tests, and moreMichael Albinus2021-12-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection): Simplify code. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-system-info): Adapt for "mtp" method. * test/lisp/net/tramp-tests.el (tramp-test18-file-attributes): Use `permission-denied' error. Simplify code. (tramp-test24-file-acl, tramp-test26-file-name-completion): Simplify code.
* | Use defvar-keymap in testsStefan Kangas2021-12-265-87/+73
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/button-tests.el (button-tests--map): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-keymap): * test/lisp/help-tests.el (help-tests-remap-map) (help-tests-major-mode-map, help-tests-minor-mode-map): * test/lisp/kmacro-tests.el (kmacro-tests-keymap): * test/lisp/repeat-tests.el (repeat-tests-map) (repeat-tests-repeat-map): * test/src/keymap-tests.el (keymap-tests-minor-mode-map) (keymap-tests-major-mode-map): Use defvar-keymap.
* | read-multiple-choice: Display "SPC" instead of " "Stefan Kangas2021-12-261-2/+7
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve display of the keys TAB, RET, SPC, DEL, and ESC. This fixes a bug where " " was highlighted in the description in a confusing way. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description) (test-rmc--add-key-description/with-attributes): Update tests for the above change.
* | read-multiple-choice: Add face when key not in name stringStefan Kangas2021-12-261-5/+5
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Add face property also when key is not in the name string. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description/with-attributes) (test-rmc--add-key-description/non-graphical-display): Update tests.
* | Factor out new function rmc--add-key-descriptionStefan Kangas2021-12-261-0/+22
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Factor out new function from... (read-multiple-choice): ...here. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description) (test-rmc--add-key-description/with-attributes) (test-rmc--add-key-description/non-graphical-display): New tests.
* | Add tag :tramp-asynchronous-processes to tramp-tests.elMichael Albinus2021-12-241-97/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp--test--deftest-direct-async-process) (tramp-test30-make-process, tramp-test31-interrupt-process) (tramp-test34-explicit-shell-file-name) (tramp-test44-asynchronous-requests): Add :tramp-asynchronous-processes tag. (tramp--test-asynchronous-processes-p): New defun. (tramp-test32-shell-command, tramp-test33-environment-variables): Use it. (tramp--test-expensive-test-p): Rename from `tramp--test-expensive-test'. Make it a defun. Adapt all callees.