aboutsummaryrefslogtreecommitdiffstats
path: root/test/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add predicate for initial_terminalBasil L. Contovounesios35 hours1-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the predicate frame-initial-p, which uses struct frame.output_method or struct terminal.type to detect initial_terminal without relying on its name (bug#80629). For some prior discussion, see: https://lists.gnu.org/r/emacs-devel/2019-12/msg00480.html https://lists.gnu.org/r/emacs-devel/2020-01/msg00120.html * doc/lispref/frames.texi (Frames): Document frame-initial-p. (Finding All Frames): Fix grammar. * etc/NEWS (Lisp Changes in Emacs 31.1): Announce frame-initial-p. * lisp/desktop.el (desktop--check-dont-save): * lisp/emacs-lisp/debug.el (debug): * lisp/frameset.el (frameset-restore): * lisp/menu-bar.el (menu-bar-update-buffers): * lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal): Use frame-initial-p instead of checking the "initial_terminal" name. * lisp/emacs-lisp/byte-opt.el: Mark frame-initial-p as error-free. * src/pgtkterm.c (pgtk_focus_changed): Use IS_DAEMON in place of Fdaemonp, thus also accepting a named daemon session. * src/terminal.c (decode_tty_terminal): Clarify commentary. (Fframe_initial_p): New function. (syms_of_terminal): Expose it. (init_initial_terminal): Update commentary now that menu-bar-update-buffers uses frame-initial-p (bug#53740). * test/lisp/xt-mouse-tests.el (with-xterm-mouse-mode): Simulate the lack of an initial terminal by overriding frame-initial-p now that turn-on-xterm-mouse-tracking-on-terminal uses it. * test/src/terminal-tests.el: New file.
* * test/src/charset-tests.el (charset-tests-define-charset): New.Helmut Eller6 days1-0/+10
|
* Merge remote-tracking branch 'origin/scratch/error-API'Stefan Monnier12 days2-5/+3
|\
| * test subdirectory: Use new error-APIStefan Monnier2026-03-102-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):
* | Fix 'comp--func-unique-in-cu-p' to match docstringJulian Scheid2026-03-123-0/+129
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp--func-unique-in-cu-p): Check only the callee name instead of requiring global uniqueness. * test/src/comp-resources/comp-test-direct-call.el: New file. * test/src/comp-resources/comp-test-direct-call-dup.el: New file. * test/src/comp-tests.el (comp-tests-has-direct-call-p) (comp-tests-direct-call-with-lambdas) (comp-tests-direct-call-with-duplicate-names): New tests.
* | Fix negated equality assumptions (bug#80327)Andrea Corallo2026-03-112-0/+18
|/ | | | | | | | | | * lisp/emacs-lisp/comp.el (comp--add-cond-cstrs): Skip negated equality assumptions only for relational non-immediate operands. Keep immediate false-branch constraints. * test/src/comp-resources/comp-test-funcs.el (comp-test-80327-hash, comp-test-80327-f): Add reproducer. * test/src/comp-tests.el (comp-tests-bug-80327): Add regression test.
* Fix `signal` calls where the data argument is not a listStefan Monnier2026-03-103-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.
* Revert "Repair serious breakage in the batch tests."Michael Albinus2026-03-041-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.
* ; * test/src/data-tests.el (data-tests-native-comp-unit): Fix test.Eli Zaretskii2026-02-271-1/+1
|
* Repair another test bollixed by aggressive optimization.Eric S. Raymond2026-02-251-5/+9
|
* Repair ab ecal test by making a variable kexical,Eric S. Raymond2026-02-251-3/+3
|
* Complete the test set for floatfns,c.Eric S. Raymond2026-02-251-2/+29
|
* Tesrts for the portable primitives in fileio.c.Eric S. Raymond2026-02-251-0/+64
|
* Tests for primitives in coding.c and charset.c.Eric S. Raymond2026-02-252-0/+177
|
* Tests for primitives from the character.c module.Eric S. Raymond2026-02-251-0/+15
|
* Tests for the lreaf.c amd print.c primitives.Eric S. Raymond2026-02-252-0/+86
|
* Tests for remaining functions iun eval.c.Eric S. Raymond2026-02-251-0/+152
|
* Completing test coverage for dataa.c orimitives.Eric S. Raymond2026-02-251-0/+105
|
* More correctness tesrs for orinitives from fns.c.Eric S. Raymond2026-02-251-0/+127
|
* More tests for edit functions, buffers, and markers.Eric S. Raymond2026-02-253-0/+139
|
* Added more buffer/marker/editing test coverage.Eric S. Raymond2026-02-254-0/+114
|
* Category/charset/coding + char-table tests.Eric S. Raymond2026-02-254-0/+173
|
* More test coverage improvements.Eric S. Raymond2026-02-255-0/+92
|
* Repair serious breakage in the batch tests.Eric S. Raymond2026-02-251-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".
* More test coverage improvements.Eric S. Raymond2026-02-254-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.
* More test coverage improvements for ERT.Eric S. Raymond2026-02-253-0/+118
| | | | In marker-tests.el, editfbs-tests.el, and data-tests.el.
* ; Fix emacs-module-tests on MS-WindowsEli Zaretskii2026-02-251-0/+6
| | | | | * test/src/emacs-module-resources/mod-test.c [WINDOWSNT]: Undef fprintf to prevent link error.
* Crrections to tedt coverrage extensuion after bootstrap build.Eric S. Raymond2026-02-252-12/+13
| | | | Files: data-tests.el, editfns-tests.el.
* Improve test coverage of builtin predicates.Eric S. Raymond2026-02-252-0/+61
|
* Tests for 2 marker primitives previously not covered.Eric S. Raymond2026-02-251-0/+23
| | | | | - insertion-type - last-position-after-kill
* Tests for 7 editor primitives previously not covered.Eric S. Raymond2026-02-251-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
* Compare circular lists in 'equal' without error (bug#80456)Mattias Engdegård2026-02-241-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.
* Add SHA-3 support to secure-hashCollin Funk2026-02-231-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.
* Adjust documentation to changes in 'overlays-in' and 'overlays-at'Eli Zaretskii2026-02-141-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.
* Add tests for per-buffer variables with predicatesHelmut Eller2026-02-121-0/+34
| | | | * test/src/data-tests.el (data-tests-per-buffer-var-predicates): New.
* Make 'overlays_in' use only real EOB (bug#80242)Stephen Berman2026-02-121-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'.
* ; Fix last change to test/src/process-tests.el.Basil L. Contovounesios2026-01-281-1/+1
|
* ; * test/src/process-tests.el: Instrument for bug#80166.Michael Albinus2026-01-271-0/+3
|
* Support cons cell for 'line-spacing'Daniel Mendler2026-01-241-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>
* ; Fix simple logic in OpenBSD's random testManuel Giraud2026-01-041-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)
* ; Add 2026 to copyright years.Sean Whitton2026-01-0153-53/+53
|
* December 2025 spelling fixesPaul Eggert2025-12-262-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.
* Add binary format specifications '%b' and '%B'Jacob S. Gordon2025-12-221-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>
* Improve handling of non-ASCII characters in 'transpose-regions'Jens Schmidt2025-12-201-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.
* Don't emit print-circle refs for empty string and vectorMattias Engdegård2025-12-041-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.
* * test/src/data-tests.el (data-tests-ash-lsh): Test for bug#79876.Mattias Engdegård2025-11-291-0/+2
|
* ; Fix cleanup in buffer-testsEli Zaretskii2025-11-161-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.
* * test/src/comp-tests.el (setcarcdr): Don't mutate literals.Mattias Engdegård2025-11-061-3/+3
|
* Change tree-sitter query predicate names (bug#79687)Yuan Fu2025-11-021-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.
* Avoid face inheritance cyclesEli Zaretskii2025-10-271-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.