aboutsummaryrefslogtreecommitdiffstats
path: root/test/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2026-03-10test subdirectory: Use new error-APIStefan Monnier2-5/+3
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--run-maybe-unsupported-function): Remove dummy branch in `condition-case`. * test/lisp/arc-mode-tests.el (define-arc-mode-test-on-type): Use `error-slot-value`. * test/src/process-tests.el (process-tests--ignore-EMFILE): * test/src/filelock-tests.el (filelock-tests-unlock-spoiled) (filelock-tests-kill-buffer-spoiled): * test/lisp/vc/vc-git-tests.el (vc-git-test--run): * test/lisp/proced-tests.el (proced--assert-process-valid-cpu-refinement): * test/lisp/emacs-lisp/pp-tests.el (pp-tests--sanity): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env) (edebug-tests-post-command): * test/lisp/autorevert-tests.el (auto-revert--deftest-remote): * test/infra/android/test-controller.el (ats-connect):
2026-03-10Fix `signal` calls where the data argument is not a listStefan Monnier3-5/+11
* test/src/thread-tests.el (threads-join-error): * test/src/emacs-module-resources/mod-test.c (Fmod_test_signal): * src/print.c (print_bind_overrides): * lisp/url/url-future.el (url-future-finish, url-future-errored) (url-future-call, url-future-cancel): Make sure signal's data is a list. * test/src/emacs-module-tests.el (mod-test-non-local-exit-signal-test): Adjust accordingly.
2026-03-04Revert "Repair serious breakage in the batch tests."Michael Albinus1-16/+0
This reverts commit feac53141577161c32a7a6dfe75399a5ae98a7c1. This patch has deactivated 253 test cases without a sufficient reasoning. Instead it speaks about a shotgun in its commite message. The patch is reverted because - It hasn't been discussed on emacs-devel. It should have, because it is a serious change in our infrastructure (new official tag :nobatch). Any documentation of this change, for example in test/README, is missing. - The proper way to deactivate such tests would have been (skip-when noninteractive) Even better to skip for the respective reasons. - There is no fault report. There is no information about how these tests have failed. Since it hasn't been a problem so far for us, nobody will work on a fix forever.
2026-02-27; * test/src/data-tests.el (data-tests-native-comp-unit): Fix test.Eli Zaretskii1-1/+1
2026-02-25Repair another test bollixed by aggressive optimization.Eric S. Raymond1-5/+9
2026-02-25Repair ab ecal test by making a variable kexical,Eric S. Raymond1-3/+3
2026-02-25Complete the test set for floatfns,c.Eric S. Raymond1-2/+29
2026-02-25Tesrts for the portable primitives in fileio.c.Eric S. Raymond1-0/+64
2026-02-25Tests for primitives in coding.c and charset.c.Eric S. Raymond2-0/+177
2026-02-25Tests for primitives from the character.c module.Eric S. Raymond1-0/+15
2026-02-25Tests for the lreaf.c amd print.c primitives.Eric S. Raymond2-0/+86
2026-02-25Tests for remaining functions iun eval.c.Eric S. Raymond1-0/+152
2026-02-25Completing test coverage for dataa.c orimitives.Eric S. Raymond1-0/+105
2026-02-25More correctness tesrs for orinitives from fns.c.Eric S. Raymond1-0/+127
2026-02-25More tests for edit functions, buffers, and markers.Eric S. Raymond3-0/+139
2026-02-25Added more buffer/marker/editing test coverage.Eric S. Raymond4-0/+114
2026-02-25Category/charset/coding + char-table tests.Eric S. Raymond4-0/+173
2026-02-25More test coverage improvements.Eric S. Raymond5-0/+92
2026-02-25Repair serious breakage in the batch tests.Eric S. Raymond1-0/+16
There were a bunch of tests that were breaking make check and should never be run in batch mode, because they do things like assuming there is a controlling tty or assuming we can access network services when we can't (e/g. in a CI/CD environment). I have shotgunned this problem by tagging all the failing tests with :nobatch and then changing the default and expensive selectors so make check won't barf all over its shoes. As many of these :nobatch should be individually removed as possible, after upgrading the test harness to mock the environmental stuff they need. Investigate these failures with "make check-nobatch".
2026-02-25More test coverage improvements.Eric S. Raymond4-0/+68
Bignum corner-case tests in data-tests.el. More buffer-primitive tests in editfns-test.el Some condition-case tesrs in eval-tests.el. And another marker-primitive test in marker-tests.el.
2026-02-25More test coverage improvements for ERT.Eric S. Raymond3-0/+118
In marker-tests.el, editfbs-tests.el, and data-tests.el.
2026-02-25; Fix emacs-module-tests on MS-WindowsEli Zaretskii1-0/+6
* test/src/emacs-module-resources/mod-test.c [WINDOWSNT]: Undef fprintf to prevent link error.
2026-02-25Crrections to tedt coverrage extensuion after bootstrap build.Eric S. Raymond2-12/+13
Files: data-tests.el, editfns-tests.el.
2026-02-25Improve test coverage of builtin predicates.Eric S. Raymond2-0/+61
2026-02-25Tests for 2 marker primitives previously not covered.Eric S. Raymond1-0/+23
- insertion-type - last-position-after-kill
2026-02-25Tests for 7 editor primitives previously not covered.Eric S. Raymond1-0/+83
- byte-to-position - byte-to-string - insert-byte - insert-buffer-substring - insert-before-markers-and-inherit - field-string-and-delete - constrain-to-field
2026-02-24Compare circular lists in 'equal' without error (bug#80456)Mattias Engdegård1-2/+10
* src/lisp.h (FOR_EACH_TAIL_INTERNAL): Divvy up the code into... (FOR_EACH_TAIL_BASIC, FOR_EACH_TAIL_STEP_CYCLEP): ...these macros, so that they can be used in more flexible ways. * src/fns.c (internal_equal_1): Detect circular lists and call... (internal_equal_cycle): ...this function that keeps comparing but now detecting cycles in the other argument. * lisp/emacs-lisp/testcover.el (testcover-after): Remove unnecessary error handling. * test/src/fns-tests.el (test-cycle-equal): Adapt and extend. * test/lisp/emacs-lisp/testcover-resources/testcases.el (testcover-testcase-cyc1): Remove case that no longer applies. * doc/lispref/objects.texi (Equality Predicates): Update. * etc/NEWS: Announce.
2026-02-23Add SHA-3 support to secure-hashCollin Funk1-0/+12
* admin/merge-gnulib (GNULIB_MODULES): Add crypto/sha3-buffer. * lib/sha3.c: New file, imported by running admin/merge-gnulib. * lib/sha3.h: Likewise. * m4/sha3.m4: Likewise. * lib/gnulib.mk.in: Updated by admin/merge-gnulib. * m4/gnulib-comp.m4: Likewise. * src/fns.c: Include sha3.h (Fsecure_hash_algorithms): Add Qsha3_224, Qsha3_256, Qsha3_384, and Qsha3_512. (secure_hash): Likewise. (Fsecure_hash): List the SHA-3 algorithms in the docstring. (syms_of_fns): Define Qsha3_224, Qsha3_256, Qsha3_384, and Qsha3_512. * test/lisp/net/gnutls-tests.el (gnutls-tests-internal-macs-upcased): Filter out the new SHA-3 algorithms since they are currently not implemented in gnutls. * test/src/fns-tests.el (test-secure-hash): Add test cases for the new algorithms. * doc/lispref/text.texi (Checksum/Hash): List the SHA-3 algorithms. Mention that they are considered secure. * etc/NEWS: Mention the new feature.
2026-02-14Adjust documentation to changes in 'overlays-in' and 'overlays-at'Eli Zaretskii1-0/+1
* src/buffer.c (overlays_in): Fix commentary to match the code. (Foverlays_in, Foverlays_at): Doc fixes. (Bug#80242) * test/src/buffer-tests.el (test-overlays-at-2): Add one test. * doc/lispref/display.texi (Finding Overlays): Update and improve the documentation of 'overlays-in' and 'overlays-at'. * etc/NEWS: Announce the changes.
2026-02-12Add tests for per-buffer variables with predicatesHelmut Eller1-0/+34
* test/src/data-tests.el (data-tests-per-buffer-var-predicates): New.
2026-02-12Make 'overlays_in' use only real EOB (bug#80242)Stephen Berman1-3/+8
This restores the original behavior of 'overlays_in'. Changes in this behavior had been made for cases of narrowing, but this resulted in a regression with uses of 'remove-overlays'. * src/buffer.c (overlays_in): Change all occurrences of ZV to Z. * test/src/buffer-tests.el (test-overlays-in-2) (test-remove-overlays): Adjust expected results to accommodate changes in 'overlays_in'.
2026-01-28; Fix last change to test/src/process-tests.el.Basil L. Contovounesios1-1/+1
2026-01-27; * test/src/process-tests.el: Instrument for bug#80166.Michael Albinus1-0/+3
2026-01-24Support cons cell for 'line-spacing'Daniel Mendler1-0/+18
* etc/NEWS: Announce the change. * src/dispextern.h (struct glyph_row): Add 'extra_line_spacing_above' member. (struct it): Add 'extra_line_spacing_above' member. * src/frame.h (struct frame): Add 'extra_line_spacing_above' member. Update comment for 'extra_line_spacing.' * src/buffer.c (syms_of_buffer): Update the docstring of 'line-spacing' to describe the cons cell usage. * src/buffer.h (struct buffer): Update comment for 'extra_line_spacing'. * src/frame.c (gui_set_line_spacing): Handle cons cell value for 'line-spacing'. Calculate and set 'extra_line_spacing_above' for both integer and float pairs. * src/xdisp.c (init_iterator): Initialize 'extra_line_spacing_above' from buffer or frame 'line-spacing', handling cons cells for both integer and float values. (gui_produce_glyphs): Use 'extra_line_spacing_above' to distribute spacing between ascent and descent. Update 'max_extra_line_spacing' calculation. (resize_mini_window): Take line spacing into account when resizing the mini window. Pass height of a single line to 'grow_mini_window' and 'shrink_mini_window'. * src/window.c (grow_mini_window, shrink_mini_window): Add unit argument which defines height of a single line. * src/window.h (grow_mini_window, shrink_mini_window): Adjust function prototypes accordingly with unit argument. * lisp/subr.el (total-line-spacing): New function to calculate total spacing from a number or cons cell. (posn-col-row): Use total-line-spacing. * lisp/simple.el (default-line-height): Use 'total-line-spacing'. * lisp/textmodes/picture.el (picture-mouse-set-point): Use 'total-line-spacing'. * lisp/window.el (window-default-line-height): Use 'total-line-spacing'. (window--resize-mini-window): Take 'line-spacing' into account. * test/lisp/subr-tests.el (total-line-spacing): New test. * test/src/buffer-tests.el (test-line-spacing): New test. * doc/emacs/display.texi (Display Custom): Document that 'line-spacing' can be a cons cell. (Line Height): Document the new cons cell format for 'line-spacing' to allow vertical centering. Co-authored-by: Przemysław Alexander Kamiński <alexander@kaminski.se> Co-authored-by: Daniel Mendler <mail@daniel-mendler.de>
2026-01-04; Fix simple logic in OpenBSD's random testManuel Giraud1-4/+3
* test/src/fns-tests.el (fns-tests-random): Do not test on OpenBSD since either equal or not equal is a valid result here. (Bug#80125)
2026-01-01; Add 2026 to copyright years.Sean Whitton53-53/+53
2025-12-26December 2025 spelling fixesPaul Eggert2-2/+2
Some of the fixes are to continue to use American rather than British spelling. * doc/misc/modus-themes.org (my-modus-themes-engraved-faces): Fix misspelled ‘:foreground’s. * etc/themes/modus-themes.el (modus-themes-faces): Fix misspelled ‘modus-themes-bold’. * lisp/emacs-lisp/rx.el (rx--normalize-char-pattern): Rename from rx--normalise-char-pattern. (rx--optimize-or-args): Rename from rx--optimise-or-args. * lisp/frame.el (frame--special-parameters): Fix misspelled "right-divider-width". * lisp/net/tramp.el (tramp-fingerprint-prompt-regexp): Use American spelling “centered”, to match current libfprintf. * lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers): Rename from org-fold-core--optimise-for-huge-buffers. (org-fold-core-update-optimization): Rename from org-fold-core-update-optimisation, leaving an alias behind. (org-fold-core-remove-optimization): Rename from org-fold-core-remove-optimisation, leaving an alias behind. * lisp/org/org.el (org-advertized-archive-subtree): This alias is now obsolete. * lisp/play/zone.el (zone-ignored-buffers): Fix misspelling of ‘zone--buffer-encrypted-p’. * lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces): Fix misspelling of ‘csharp’ group. * lisp/vc/vc.el (vc-clonable-backends-custom-type): Rename from vc-cloneable-backends-custom-type, leaving an alias behind. * test/lisp/emacs-lisp/bytecomp-tests.el: (bytecomp-tests--warn-arity-non-compiled-callee): Rename from bytecomp-tests--warn-arity-noncompiled-callee. (bytecomp-test-defface-spec): Reword a deliberate misspelling of “default” that is so common I don’t want it to pollute the spelling dictionary. * test/lisp/emacs-lisp/package-vc-tests.el: (package-vc-tests-preserve-artifacts): Rename from package-vc-tests-preserve-artifacts. * test/lisp/eshell/em-prompt-tests.el: (em-prompt-test/forward-backward-paragraph-1): Reword a deliberate misspelling of “goodbye” that is so common I don’t want it to pollute the spelling dictionary.
2025-12-22Add binary format specifications '%b' and '%B'Jacob S. Gordon1-2/+81
These produce the binary representation of a number. '%#b' and '%#B' prefix with '0b' and '0B', respectively. (bug#79990) * etc/NEWS: Announce change. * doc/lispref/strings.texi (Formatting Strings): Describe new format specs and add to comment on reconstructing the value with 'read'. * src/editfns.c (format): Update doc string. (styled_format): Add support for '%b' and '%B'. To remain portable, avoid use of 'sprintf' by converting by hand. * test/src/editfns-tests.el (format-binary-zero, format-binary-floats) (format-binary-nonzero-integers): Add tests. (read-large-integer): Add binary test cases. Co-authored-by: Paul Eggert <eggert@cs.ucla.edu>
2025-12-20Improve handling of non-ASCII characters in 'transpose-regions'Jens Schmidt1-0/+204
* src/editfns.c (Ftranspose_regions): Separate code related to character semantics from that related to byte semantics and in that way leverage optimizations for regions of equal length with respect to both semantics. Move and update comments dating back to the initial implementation. * test/src/editfns-tests.el (editfns-tests--transpose-regions-tests) (editfns-tests--transpose-regions-markups) (editfns-tests--transpose-regions): New test and accompanying variables.
2025-12-04Don't emit print-circle refs for empty string and vectorMattias Engdegård1-1/+4
The empty vector and string(s) are immutable, contain no references and always read as the same objects. * src/print.c (PRINT_CIRCLE_CANDIDATE_P): Turn macro into... (print_circle_candidate_p): ...a function, and exclude [] and "". * test/src/print-tests.el (print-circle): Add test case.
2025-11-29* test/src/data-tests.el (data-tests-ash-lsh): Test for bug#79876.Mattias Engdegård1-0/+2
2025-11-16; Fix cleanup in buffer-testsEli Zaretskii1-3/+13
* test/src/buffer-tests.el (test-restore-buffer-modified-p) (test-buffer-chars-modified-ticks): Don't leave unsaved and modified file buffers after the tests.
2025-11-06* test/src/comp-tests.el (setcarcdr): Don't mutate literals.Mattias Engdegård1-3/+3
2025-11-02Change tree-sitter query predicate names (bug#79687)Yuan Fu1-3/+3
Latest tree-sitter library throws a syntax error if the predicate names in a query don't end with question mark. So we made the following change: :equal changed to :eq? :match changed to :match? :pred changed to :pred? Old names are transparently converted to new names when expanding patterns. :match predicate can now take the regexp and the node in any order: it'll figure out which is which automatically. This way it works with current Emacs convention (regexp first), as well as tree-sitter's match convention (regexp second). * doc/lispref/parsing.texi (Pattern Matching): Update manuel to use new predicate names. * src/treesit.c: (Ftreesit_pattern_expand): (Ftreesit_query_expand): (treesit_predicate_match): (treesit_eval_predicates): (syms_of_treesit): Use new predicate names. * test/src/treesit-tests.el (treesit-query-api): Update test.
2025-10-27Avoid face inheritance cyclesEli Zaretskii1-0/+13
* src/xfaces.c (face_inheritance_cycle): New function. (Finternal_set_lisp_face_attribute): Signal an error if the ':inherit' attribute of a face is modified in a way that will cause it to inherit from itself. (Bug#79672) * test/src/xfaces-tests.el (xfaces-test-circular-inheritance): New test. * etc/NEWS: Announce the incompatible change.
2025-10-18Add a test for puthashHelmut Eller1-0/+16
It's actually for a bug on the feature/igc branch. * test/src/fns-tests.el (ft-puthash-weak): New test (ft--puthash-weak): New helper.
2025-10-18Respect keymaps in buffer text for clicks on displayed stringsSpencer Baugh1-5/+16
When clicking on a string displayed by a display property, also look at the text properties of the underlying buffer text for keymaps, not just the displayed string. The displayed string takes precedence over the buffer text, but it doesn't replace it. Also, we should use the buffer's local map even for clicks on the mode line. (Otherwise, what's the point of the <mode-line> event?) * src/keymap.c (Fcurrent_active_maps): Consider displayed string, then buffer text, then fall back to local map. (Bug#79505) * test/src/keymap-tests.el (keymap-test-keymaps-for-non-buffer-positions): Add more tests.
2025-10-17Add some tests for weak hashtablesHelmut Eller1-0/+127
Also add ft- as shorthand for fns-tests-. * test/src/fns-tests.el (ft-hash-table-weakness, ft-weak-key-removal) (ft-weak-value-removal, ft-weak-and-removal, ft-weak-or-removal): New tests. (ft--test-weak-removal, ft--gc, ft--check-entries, ft--check-entry) (ft--hash-table-entries, ft--populate-hashtable, ft--component-num) (ft--parse-component, ft--dead-component, ft--format-component) (ft--init-rng, ft--nentries): New helpers.
2025-10-11Allow creating a pipe process without a bufferSpencer Baugh1-0/+6
Previously, even passing :buffer nil to make-pipe-process would create a buffer. Now, if you explicitly call (make-pipe-process :buffer nil), it will create a pipe process without a buffer, just like all the other process creation functions. * src/process.c (Fmake_pipe_process): Check for explicit :buffer nil and don't make a buffer. (bug#79596) * doc/lispref/processes.texi (Asynchronous Processes): Update. * test/src/process-tests.el (process-test-make-pipe-process-no-buffer): Add test.
2025-09-18Fix failed tests on embaMichael Albinus1-0/+2
* test/lisp/autorevert-tests.el (auto-revert-test05-global-notify) (auto-revert-test07-auto-revert-several-buffers): Adapt tests. * test/src/comp-resources/comp-test-funcs.el (foo): Define error symbol.