summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Merge from origin/emacs-28Stefan Kangas2021-12-231-8/+0
|\| | | | | | | | | | | | | | | | | 29fffbdd87 Revert field-related thingatpt changes 9bcb732686 * lisp/window.el (quit-restore-window): Select previously ... b7d31d6192 Revert "Remove Motif support" # Conflicts: # etc/NEWS
| * Revert field-related thingatpt changesLars Ingebrigtsen2021-12-221-8/+0
| | | | | | | | | | | | This reverts 7db376e560448e61485ba054def8c82b21f33d6a, which led to severe performance regressions when being run in large buffers with no fields (bug#52593)
* | Fix compile time error in a pcase testStefan Kangas2021-12-221-2/+5
| | | | | | | | * test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-cl-type): Fix test.
* | Make substitute-command-keys test less brittleStefan Kangas2021-12-221-4/+26
| | | | | | | | | | | | | | * test/lisp/help-tests.el (help-tests--test-keymap): New keymap variable. (help-tests-substitute-command-keys/keymaps): Make test less brittle by using above new keymap.
* | Fix some Tramp testsMichael Albinus2021-12-221-13/+18
| | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p) (tramp-test14-delete-directory, tramp-test29-start-file-process) (tramp-test30-make-process): Adapt tests.
* | Adjust test after recent help.el changeLars Ingebrigtsen2021-12-221-0/+1
| |
* | Declare functions to silence byte-compilerStefan Kangas2021-12-214-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (gnutls-symmetric-decrypt, gnutls-ciphers): * lisp/net/dbus.el (libxml-parse-xml-region): * lisp/simple.el (thread-name): * lisp/thread.el (thread-name, thread-signal, thread--blocker) (current-thread, thread-live-p, all-threads): * test/lisp/emacs-lisp/multisession-tests.el (sqlite-close): * test/lisp/net/gnutls-tests.el (gnutls-symmetric-decrypt) (gnutls-symmetric-encrypt, gnutls-hash-mac, gnutls-hash-digest) (gnutls-ciphers, gnutls-digests, gnutls-macs): * test/lisp/net/network-stream-tests.el (gnutls-peer-status): * test/lisp/net/shr-tests.el (libxml-parse-html-region): * test/src/decompress-tests.el (zlib-decompress-region): * test/src/process-tests.el (thread-last-error, thread-join) (make-thread): * test/src/xml-tests.el (libxml-parse-xml-region): Declare functions to silence byte-compiler in --without-all builds.
* | Fix some tests in --without-all buildsStefan Kangas2021-12-211-1/+2
| | | | | | | | | | | | | | * test/lisp/image-tests.el (image-type/from-filename): * test/src/image-tests.el (image-tests-init-image-library): * test/src/thread-tests.el (threads-test-bug33073): Fix tests in --without-all builds.
* | Silence additional byte-compiler warning in testStefan Kangas2021-12-211-0/+1
| | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el: Silence byte-compiler.
* | Fix bug#28557Stefan Monnier2021-12-201-26/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/cconv-tests.el: Remove `:expected-result :failed` from the bug#28557 tests. (cconv-tests-cl-function-:documentation): Account for the presence of the arglist (aka "usage") in the docstring. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Handle non-constant `:documentation`. * lisp/emacs-lisp/generator.el (iter-lambda): * lisp/emacs-lisp/cconv.el (cconv--convert-funcbody): Use `macroexp-parse-body`.
* | eieio-tests.el: Silence last warningsStefan Monnier2021-12-201-1/+4
| | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-tests--dummy): New class. (eieio-test-22-init-forms-dont-match-runnable): Tweak to silence warning.
* | ; Minor license statement fixesStefan Kangas2021-12-204-18/+22
| |
* | Use declare-function instead of defun in eieio-tests.elStefan Kangas2021-12-201-8/+8
| | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Prefer declare-function to defun.
* | Body of dynamic let-bindings is not in tail positionMattias Engdegård2021-12-201-1/+18
| | | | | | | | | | | | | | | | This fixes a known bug in `named-let`. * lisp/emacs-lisp/cl-macs.el (cl--self-tco): Prevent TCO from inside dynamic variable bindings. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test.
* | Add `macroexp--dynamic-variable-p`Mattias Engdegård2021-12-202-1/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This predicate can be used for discriminating between lexically and dynamically bound variables during macro-expansion (only). It is restricted to internal use for the time being. * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Use macroexpand--all-toplevel. * lisp/emacs-lisp/macroexp.el (macroexp-dynamic-variable-p): New. (macroexp--expand-all): Maintain macroexp--dynvars. (macroexpand-all): Rebind macroexp--dynvars. (macroexpand--all-toplevel): New. (internal-macroexpand-for-load): Use macroexpand--all-toplevel. * src/eval.c (eval_sub): Transfer defvar declarations from Vinternal_interpreter_environment into macroexp--dynvars during lazy macro-expansion. * src/lread.c (readevalloop): Rebind macroexp--dynvars around read-and-evaluate operations. (syms_of_lread): Define macroexp--dynvars. * test/lisp/emacs-lisp/macroexp-resources/vk.el: New file. * test/lisp/emacs-lisp/macroexp-tests.el (macroexp-tests--run-emacs) (macroexp-tests--eval-in-subprocess) (macroexp-tests--byte-compile-in-subprocess) (macroexp--tests-dynamic-variable-p): Add tests.
* | Silence byte-compiler using with-no-warnings in testsStefan Kangas2021-12-202-65/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | We could silence the specific warnings by adding support for them to with-suppressed-warnings, but it is almost not worth the complexity for warnings that only show up in one file. In any case, it is not urgent, so leave behind FIXMEs for now. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-37-obsolete-name-in-constructor, class-c) (eieio-test-01-mix-alloc-initarg, slotattr-class-base): * test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-generic-co-located-default): Silence byte-compiler.
* | Silence undefined function warnings in eieio-tests.elStefan Kangas2021-12-201-1/+12
| | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Silence byte-compiler with some function definitions. These are overridden by class definitions further down.
* | Prefer skip-unless in one eieio testStefan Kangas2021-12-201-13/+13
| | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-01-mix-alloc-initarg): Use skip-unless to correctly mark the test as skipped.
* | Silence byte-compiler in cconv-tests.elStefan Kangas2021-12-201-12/+14
| | | | | | | | | | | | * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests-iter-lambda-:documentation) (cconv-tests-cl-function-:documentation): Silence byte-compiler.
* | Silence "initform needs quoting" warning in testsStefan Kangas2021-12-192-11/+11
| | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (persist-simple): * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (class-a) (class-c, inittest, slotattr-base, slotattr-ok) (slotattr-class-base, slotattr-class-ok, IT): Silence byte-compiler warnings about "ambiguous initform needs quoting".
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsMichael Albinus2021-12-192-0/+7
|\ \
| * | Silence "Unknown slot" warnings in testsStefan Kangas2021-12-192-0/+7
| | | | | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: * test/lisp/net/ntlm-tests.el: Silence byte-compiler.
* | | Fix timeout problem in autorevert-tests.elMichael Albinus2021-12-191-20/+6
|/ / | | | | | | | | * test/lisp/autorevert-tests.el (auto-revert-test05-global-notify): Remove debug message. Increase timeout.
* | Make generation of JUnit test reports more robust.Michael Albinus2021-12-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-load-file-name): New defvar. (ert-write-junit-test-report): Use it. Make detection of selector more robust. Protect calls of `xml-escape-string' with 'noerror. * test/infra/Makefile.in (subdir_template): Use "make -k ...". * test/infra/gitlab-ci.yml (test-filenotify-gio): Adapt make_params in order to get a JUnit test report. (test-native-comp-speed0): Use "make -k ...". * test/infra/test-jobs.yml: Regenerate. * test/lisp/progmodes/perl-mode-tests.el (top): Set `ert-load-file-name'.