1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-09 07:41:40 -07:00
Commit graph

8590 commits

Author SHA1 Message Date
Vincent Belaïche
ebd982db33 Check all SES local variables are always set locally. 2026-03-24 18:18:10 +01:00
Vincent Belaïche
b677a90303 Rename ses tests with prefix ses-tests-... 2026-03-24 18:18:08 +01:00
Vincent Belaïche
bb0a5dd6e7 Fix SES tests indentation.
* test/lisp/ses-tests.el (ses-jump-B2-lowcase)
(ses-jump-B2-lowcase-keys): Fix indentation.
2026-03-24 18:18:07 +01:00
F. Jason Park
7b8a38e053 Add tests for erc-track-faces-normal-list regression
* test/lisp/erc/erc-track-tests.el
(erc-track-tests--modified-channels/baseline): Update assertion to
expect an unchanged mode line segment if `erc-track-faces-normal-list'
lacks a ranked face in the latest inserted message.
(erc-track-modified-channels/baseline/nonotice)
(erc-track-modified-channels/priority-only-all/baseline/nonotice): New
tests.  (Bug#80659)
2026-03-23 18:16:31 -07:00
Sean Whitton
c9676d68a2 ; Update tests to match rename of 'any' to 'member-if'. 2026-03-23 12:23:26 +00:00
Sean Whitton
17a3f6bf99 * lisp/subr.el (member-if): Fix compiler macro multiple evaluation.
Problem reported by Pip Cet <pipcet@protonmail.com>.
2026-03-22 16:03:16 +00:00
Helmut Eller
e427d55284 * test/src/charset-tests.el (charset-tests-define-charset): New. 2026-03-21 18:42:01 +01:00
Basil L. Contovounesios
fac42338bb Make member-if compiler-macro hygienic
* lisp/subr.el (member-if): Use uninterned symbol in
compiler-macro (bug#80647).
2026-03-21 13:51:27 +01:00
Stéphane Marks
48d65afa32 vtable truncate-string-pixelwise, ellipsis can be a string (bug#80026)
Eliminate 'vtable--limit-string' in favor of the more efficient
'truncate-string-pixelwise'.  Remove extraneous pre-measurement
calls to 'string-pixel-width' and ellipsis concatenation as
'truncate-string-pixelwise' does both.
The 'make-vtable' 'ellipsis' keyword can be a string to override
the default returned by 'truncate-string-ellipsis'.

* lisp/emacs-lisp/vtable.el (vtable--ellipsis): New defun.
(vtable-insert-object, vtable--insert): Use 'vtable--ellipsis'.
(vtable--insert-line, vtable--insert-header-line): Call
'truncate-string-pixelwise' instead of 'vtable--limit-string'.
(vtable--limit-string): Remove function.

* test/lisp/emacs-lisp/vtable-tests.el
(test-vtable--limit-string-with-face-remapped-buffer): Remove
test, obsoleted by misc-test-truncate-string-pixelwise.

* doc/misc/vtable.texi: Document that :ellipsis can be a string.
2026-03-21 12:50:04 +02:00
Stefan Monnier
3ed7868f6e simple-tests.el: Use kmacro function
* test/lisp/simple-tests.el (undo-test-kill-c-a-then-undo)
(undo-test-point-after-forward-kill): Use `kmacro` function.
2026-03-20 23:19:43 -04:00
Philip Kaludercic
c852297037
; Adjust use-package tests for :vc
See https://lists.gnu.org/archive/html/emacs-devel/2026-03/msg00567.html.

* test/lisp/use-package/use-package-tests.el (use-package-test-normalize/:vc):
Drop or change expected to match change that interprets a string
argument to :vc in the same manner as 'package-vc-install.
2026-03-19 21:38:29 +01:00
Elías Gabriel Pérez
c911495fb1 hideshow: New minor mode 'hs-indentation-mode'. (Bug#80179)
This minor mode configures hs-minor-mode to use
indentation-based folding.

* lisp/progmodes/hideshow.el (hs-hideable-block-p): New
function.
(hs-indentation-respect-end-block): New option.
(hs-indentation--store-vars): New variable.
(hs-cycle-filter, hs-get-first-block-on-line, hs-get-near-block)
(hs-find-block-beg-fn--default): Adapt code to use
'hs-hideable-block-p'.
(hs-block-positions): Update.
(hs-indentation-mode): New minor mode.

* doc/emacs/programs.texi (Hideshow): Update documentation.

* etc/NEWS: Announce changes

* test/lisp/progmodes/hideshow-tests.el: Add 'require'.
(hideshow-check-indentation-folding): New test.
2026-03-19 17:11:54 +02:00
Stefan Monnier
e2004eb56f Merge remote-tracking branch 'origin/scratch/error-API' 2026-03-15 17:17:21 -04:00
Julian Scheid
f15ad18a14 Fix 'comp--func-unique-in-cu-p' to match docstring
* 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.
2026-03-12 09:08:08 +01:00
Philip Kaludercic
dad9864340
; Load missing features to run package-vc tests 2026-03-12 08:59:25 +01:00
Philip Kaludercic
cfe9d94524
; Use "example.com" in package-vc-tests
* test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-v0.1.el.in:
* test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-v0.2.el.in:
Update headers.
* test/lisp/emacs-lisp/package-vc-tests.el (prepare-patch)
(package-vc-with-tests-environment): Adjust expected values.
2026-03-11 21:33:08 +01:00
Philip Kaludercic
fb729157d3
; Relax "prepare-patch" test for package-vc
This change is partially necessary due to the changes to
'package-maintainers' in 4b253c39b1.

* test/lisp/emacs-lisp/package-vc-tests.el (prepare-patch): Do
not match exact order of headers, and do not match exact syntax
of email address.
2026-03-11 21:33:08 +01:00
Basil L. Contovounesios
8d356c55ad Tweak recent error descriptor changes
* etc/NEWS: Fix capitalization and markup.
* lisp/emacs-lisp/ert.el (ert--should-error-handle-error): Prefer
any over cl-some where either will do.
* lisp/epa-file.el (epa-file--find-file-not-found-function):
Reindent.
(epa-file--error-add-context): Use correct variables.  Add
docstring.
* lisp/ffap.el (ffap-machine-p):
* lisp/gnus/nnmaildir.el (nnmaildir--emlink-p): Prefer
string-equal-ignore-case over case fiddling.
* lisp/gnus/gnus-search.el (gnus-search-run-query): Fix typo in
error re-signaling.
* lisp/ibuffer.el (ibuffer-confirm-operation-on): Prefer string
search over regexp matching where either will do.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--run-maybe-unsupported-function): Pacify unused
condition-case error variable warnings (bug#72212).
2026-03-11 16:05:04 -04:00
Stefan Monnier
261f4a012e (subr-error-API): New test. Also, improve the etc/NEWS
* test/lisp/subr-tests.el (subr-error-API): New test.
2026-03-11 12:39:14 -04:00
Andrea Corallo
40f4fc1d8c Fix negated equality assumptions (bug#80327)
* 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.
2026-03-11 17:09:57 +01:00
Michael Albinus
d3adff8c8f Improve tramp-tests.el
* test/lisp/net/tramp-tests.el (ert-temp-file-prefix)
(ert-temp-file-suffix, ert--with-temp-file-generate-suffix)
(ert-with-temp-file, ert-with-temp-directory): Add them if they
don't exist.
(tramp--test-make-temp-name, tramp--test-kubernetes-p)
(tramp--test-supports-set-file-times-p): New defuns.
(tramp--test-make-temp-name): Use `tramp--test-make-temp-prefix'.
(tramp-test03-file-error, tramp-test20-file-modes)
(tramp-test22-file-times, tramp-test26-file-name-completion):
Adapt tests.
2026-03-11 16:26:35 +01:00
Stefan Monnier
6d8b3d1077 test subdirectory: Use new error-API
* 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-10 10:48:22 -04:00
Stefan Monnier
ea5f15d096 Fix signal calls where the data argument is not a list
* 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-10 00:13:31 -04:00
Yuan Fu
320e33a85f
Ensure c-ts-mode tests are never stuck (bug#80565)
* test/lisp/progmodes/c-ts-mode-tests.el: Don't prompt for
installing cpp grammar when they're not installed.
2026-03-08 22:53:48 -07:00
Michael Albinus
fedf45ca63 Revert "Repair serious breakage in the batch tests."
This reverts commit feac531415.

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-03-04 19:24:52 +01:00
Sean Whitton
7d63d267f2 Rename 'any' to 'member-if' and deprecate 'cl-member-if'
* lisp/subr.el (any): Rename from this ...
(member-if): ... to this.  All uses changed.
(any): New function alias.
* lisp/emacs-lisp/cl-seq.el (cl-member-if): Mark obsolete.
* lisp/obsolete/cl.el (member-if): Delete obsolete function
alias.
* doc/lispref/lists.texi (List Elements):
* doc/misc/cl.texi (Lists as Sets):
* etc/NEWS: Document the change.
2026-03-04 14:43:05 +00:00
Mattias Engdegård
7eba545a4e Revert "Rename 'any' to 'member-if' and deprecate 'cl-member-if'"
This reverts commit 2bdf15f6d8.

There is no consensus for this change.
2026-03-03 17:21:35 +01:00
Sean Whitton
2bdf15f6d8 Rename 'any' to 'member-if' and deprecate 'cl-member-if'
* lisp/subr.el (any): Rename from this ...
(member-if): ... to this.  All uses changed.
Implement '&key KEY-FN' for backwards compatibility.
(any): New function alias.
* lisp/emacs-lisp/cl-seq.el (cl-member-if): Make an alias for
'member-if'.
* lisp/obsolete/cl.el (member-if): Delete obsolete function
alias.
* doc/lispref/lists.texi (List Elements):
* doc/misc/cl.texi (Lists as Sets):
* etc/NEWS: Document the change.
2026-03-03 13:57:07 +00:00
Jacek Świerk
60bbe8786a Add Rust panic message pattern (bug#80403)
* etc/compilation.txt: Add example.
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
New rule.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-test-error-regexps): Add test case.

Copyright-paperwork-exempt: yes
2026-03-01 15:35:10 +01:00
Eli Zaretskii
959da75342 ; * test/src/data-tests.el (data-tests-native-comp-unit): Fix test. 2026-02-27 15:29:16 +02:00
Richard Lawrence
f0dbe25d4c Fix `diary-rrule' recurrence rule calculation (Bug#80460)
Thanks to TAKAHASHI Yoshio for reporting and for fixing one of
the typos.  In addition to the reported bug involving
:include/:exclude, testing revealed that the provided RRULE
COUNT clause was also not being handled correctly; this change
also fixes that.
* lisp/calendar/diary-icalendar.el (diary-rrule): Handle
recurrence rules with a COUNT clause.
* lisp/calendar/icalendar-recur.el
(icalendar-recur-recurrences-in-interval): Fix a couple of
typos that caused RDATE/EXDATE calculations to fail.
* test/lisp/calendar/diary-icalendar-tests.el
(diary-icalendar-test-rrule-bug-80460): New test for this bug.
2026-02-26 14:25:22 +02:00
Eli Zaretskii
c73823dddd ; Fix esh-proc-tests on MS-Windows
* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill/process-id)
(esh-proc-test/kill/process-object): Fix these tests on MS-Windows.
2026-02-26 08:00:02 +02:00
Eric S. Raymond
47735e0243 Repair another test bollixed by aggressive optimization. 2026-02-25 20:51:21 -05:00
Eric S. Raymond
ca42055b0c Repair ab ecal test by making a variable kexical, 2026-02-25 20:20:26 -05:00
Eric S. Raymond
1b0c8d6b95 Complete the test set for floatfns,c. 2026-02-25 20:18:31 -05:00
Eric S. Raymond
a339c6827c Tesrts for the portable primitives in fileio.c. 2026-02-25 19:54:11 -05:00
Eric S. Raymond
5749b2e4f4 Tests for primitives in coding.c and charset.c. 2026-02-25 19:41:05 -05:00
Eric S. Raymond
b09f8df206 Tests for primitives from the character.c module. 2026-02-25 19:41:05 -05:00
Eric S. Raymond
d7a3d442b4 Tests for the lreaf.c amd print.c primitives. 2026-02-25 19:03:02 -05:00
Eric S. Raymond
cd038e5617 Tests for remaining functions iun eval.c. 2026-02-25 18:54:50 -05:00
Eric S. Raymond
a6e19d6179 Completing test coverage for dataa.c orimitives. 2026-02-25 18:35:02 -05:00
Eric S. Raymond
40ff4512ad More correctness tesrs for orinitives from fns.c. 2026-02-25 18:25:58 -05:00
Eric S. Raymond
67e8f87562 More tests for edit functions, buffers, and markers. 2026-02-25 18:10:05 -05:00
Eric S. Raymond
3dda4b85e8 Added more buffer/marker/editing test coverage. 2026-02-25 17:52:42 -05:00
Eric S. Raymond
7a93a7b334 Category/charset/coding + char-table tests. 2026-02-25 17:23:46 -05:00
Eric S. Raymond
fc7339c46d More test coverage improvements. 2026-02-25 17:06:50 -05:00
Eric S. Raymond
feac531415 Repair serious breakage in the batch tests.
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-25 16:36:50 -05:00
Eric S. Raymond
95329bf445 More test coverage improvements.
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-25 13:21:25 -05:00
Eric S. Raymond
e42c579a54 More test coverage improvements for ERT.
In marker-tests.el, editfbs-tests.el, and data-tests.el.
2026-02-25 13:21:25 -05:00
Eli Zaretskii
de44026297 ; Fix emacs-module-tests on MS-Windows
* test/src/emacs-module-resources/mod-test.c [WINDOWSNT]: Undef
fprintf to prevent link error.
2026-02-25 19:32:46 +02:00