1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00
Commit Graph

6419 Commits

Author SHA1 Message Date
Mattias Engdegård
600b90ed56 Mark failing icalendar test as unstable (bug#56241)
* test/lisp/calendar/icalendar-tests.el
(icalendar-export-bug-56241-dotted-pair):
This test started failing early July 2023 in multiple branches at
once without any change to the code and is likely sensitive to the
current date.  Tag it to keep it quiet for now.
2023-07-07 14:40:37 +02:00
Mattias Engdegård
e339d0080d ; * test/lisp/misc-tests.el (ert): require misc to avoid warning 2023-07-01 12:33:16 +02:00
Juri Linkov
d5cff340b3 * lisp/misc.el (duplicate-line-final-position): New defcustom (bug#64185).
* lisp/misc.el (duplicate-line): Use it.

* test/lisp/misc-tests.el (misc--duplicate-line): Add tests for
duplicate-line-final-position.

Don't merge to master.
2023-06-29 10:13:06 +03:00
Daniel Martín
ef16339918 Make js-beginning-of-defun return non-nil on success
The docstring of 'beginning-of-defun-function' says that the
function shall return non-nil when it found the beginning
of a defun.  This is specially important because the calling
code decides when to move point depending on the return value.
* lisp/progmodes/js.el (js-beginning-of-defun)
(js--beginning-of-defun-flat): Return non-nil when the beginning
of a defun is found.  (Bug#64283)

* test/lisp/progmodes/js-tests.el (js-mode-end-of-defun): Add a unit
test.
2023-06-29 08:37:15 +03:00
Basil L. Contovounesios
8dc08333ee Fix bol/bos anchors in tree-sitter :match regexps
Further regexp fixes to follow separately (bug#64019#29).

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
* lisp/progmodes/cmake-ts-mode.el
(cmake-ts-mode--font-lock-settings):
* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
* lisp/progmodes/python.el (python--treesit-settings):
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
* lisp/progmodes/sh-script.el (sh-mode--treesit-settings):
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
* test/src/treesit-tests.el (treesit-query-api): Anchor :match
regexps at beginning/end of string, not line.
2023-06-13 14:35:14 +01:00
Morgan Smith
90047c38ce Add test for when 'completion-auto-help' is 'visible'
* test/lisp/minibuffer-tests.el (completion-auto-help-test): Add
test for when 'completion-auto-help' is 'visible'.  Also test
for successful completion message.  (Bug#63913)
2023-06-10 20:53:01 +03:00
Andrea Corallo
65f355ea0a ; Update my mail address
* lisp/emacs-lisp/comp-cstr.el: Update author mail.
* lisp/emacs-lisp/comp.el: Likewise.
* src/comp.c: Likewise.
* test/lisp/emacs-lisp/comp-cstr-tests.el: Likewise.
* test/src/comp-resources/comp-test-funcs-dyn.el: Likewise.
* test/src/comp-resources/comp-test-funcs.el: Likewise.
* test/src/comp-resources/comp-test-pure.el: Likewise.
* test/src/comp-tests.el: Likewise.
2023-06-08 11:04:10 +02:00
Michael Albinus
2eadf328d0 * test/infra/Dockerfile.emba (emacs-base): Don't install gawk. 2023-06-03 17:52:46 +02:00
Michael Albinus
0eba9cf651 * test/infra/Dockerfile.emba (emacs-base): Install also gawk. 2023-06-03 09:54:52 +02:00
kobarity
6b2c8dc905 Revert "Enhance Python font-lock to support multilines"
This reverts commit 4915ca5dd4.

We have found that there are performance issues when editing a large
file.  The issue can be reproduced as follows:

1. emacs -Q
2. Open large Python file (e.g. turtle.py in Python)
3. Near the top of the buffer, enter open paren and some characters.

The above commit extends the region to be font-locked using
`python-nav-end-of-statement'.  However, if there are unbalanced
parens, it may move point to the end of the buffer.  This causes
almost the entire buffer to be font-locked, which is not acceptable
for large files.
2023-06-03 10:09:33 +03:00
kobarity
b7b82ecb2b Fix python-info-docstring-p
* lisp/progmodes/python.el (python-info-docstring-p): Stop using
python-rx string-delimiter.

* test/lisp/progmodes/python-tests.el
(python-font-lock-escape-sequence-bytes-newline)
(python-font-lock-escape-sequence-hex-octal)
(python-font-lock-escape-sequence-unicode)
(python-font-lock-raw-escape-sequence): Mark as expected failures
until another bug in 'python-info-docstring-p' is corrected.
(python-info-docstring-p-7): New test.  (Bug#63622)
2023-05-26 12:57:30 +03:00
Mattias Engdegård
f535c0e49d Handle #@00 in new reader in a compatible way (bug#63722)
This was a regression from Emacs 28.

* src/lread.c (skip_lazy_string, read0): Make #@00 read as nil, which
is a quirk from the old reader that we preserve for compatibility.
* test/src/lread-tests.el (lread-skip-to-eof): Verify it.

Reported by Richard Newton.
2023-05-26 10:22:51 +02:00
Eli Zaretskii
ead3a2abbf Fix loading SQLite extensions
* src/sqlite.c (sqlite3_db_config) [WINDOWSNT]: Load from the DLL.
(Fsqlite_load_extension): Use 'sqlite3_db_config' to enable and
disable loading of extensions.  Add a few free extensions to the
allow-list.  Fix testing for the ".dll" extension.  (Bug#63590)

* test/src/sqlite-tests.el (sqlite-load-extension): Fix the test
to require successful load if the extension does exist.
2023-05-20 15:43:44 +03:00
Yuan Fu
459d08c7fe
Fix tree-sitter test (bug#63481)
* test/src/treesit-tests.el (treesit-basic-parsing): Latest json
parser doesn't return an error on empty buffer or multiple objects
anymore [1].

40a81c01a4
2023-05-18 14:45:15 -07:00
Thuna
b93eb68cc3 Use 'calendar-buffer' instead of fixed string
* test/lisp/calendar/cal-julian-tests.el (with-cal-julian-test):
Use 'calendar-buffer' instead of a literal fixed name.
(Bug#61546)

Copyright-paperwork-exempt: yes
2023-05-02 21:02:19 +03:00
Dmitry Gutov
a22eb9ae0f ruby-add-log-current-method: Reduce the use of 'nreverse'
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Reduce the use of 'nreverse' (bug#62761).

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-singleton-referencing-outer):
New test.
2023-04-13 00:46:11 +03:00
Eli Zaretskii
372e024acc ; Fix wallpaper-tests on XFCE
* test/lisp/image/wallpaper-tests.el
(wallpaper--find-command-args/return-list): Account for
command-args being a function.  (Bug#62673)
2023-04-11 17:47:48 +03:00
Eli Zaretskii
c62afb10cf Fix wallpaper-tests on MS-Windows
* test/lisp/image/wallpaper-tests.el (wallpaper--find-setter)
(wallpaper--find-setter/call-predicate)
(wallpaper--find-setter/set-current-setter)
(wallpaper-set/calls-init-action)
(wallpaper-set/calls-wallpaper-set-function)
(wallpaper-set/runs-command, wallpaper-set/runs-command/detach):
Skip these tests if native functions are used for changing
wallpaper.  These tests are irrelevant in that case.
2023-04-11 10:33:32 +03:00
Basil L. Contovounesios
f2d212c696 Fix a couple of eglot-tests
* test/lisp/progmodes/eglot-tests.el
(eglot-test-rust-analyzer-watches-files): Bump timeout.
(eglot-test-json-basic): Check for yas-minor-mode before using it,
like other tests do (bug#61637).
2023-04-11 07:40:15 +01:00
Dmitry Gutov
db8f207e52 Fix some cases of incomplete code's indentation [c/c++-ts-mode]
* lisp/progmodes/c-ts-mode.el (c-ts-base--before-indent): Try to
guess when the parse tree is incomplete, and provide a better node
to indent against (bug#62717).
(c-ts-base-mode): Set up advice for local treesit-indent-function.
2023-04-10 02:58:46 +03:00
João Távora
57490fff6e ; Backport: Eglot: fix misplaced parenthesis in last commit to eglot-tests.el
* test/lisp/progmodes/eglot-tests.el
(eglot-test-eldoc-after-completions): Fix misplaced parenthesis.

(cherry picked from commit 3aedd5c920)
2023-04-09 15:36:08 +02:00
João Távora
2a62273f3b Backport: Eglot: no more tests based on Pylsp (bug#62694)
The functionality under test in eglot.el is exactly the same, but use
the clangd server only, as that is used in more tests, and it is much
easier to check if it misbehaves or not.

Tests pass with clangd version 15.

* test/lisp/progmodes/eglot-tests.el (python): Don't require it.
(eglot--call-with-fixture): Simplify.
(eglot--wait-for-clangd): New helper.
(eglot-test-basic-completions)
(eglot-test-non-unique-completions, eglot-test-basic-xref)
(eglot-test-snippet-completions)
(eglot-test-snippet-completions-with-company)
(eglot-test-eldoc-after-completions, eglot-test-multiline-eldoc):
Use clangd, not pylsp.
(eglot-test-formatting): Renamed from
eglot-test-python-autopep-formatting.
(eglot-test-python-yapf-formatting): Remove.

(cherry picked from commit fc8230f336)
2023-04-09 15:34:32 +02:00
Michael Albinus
257090b872 Adapt EMBA scripts.
* test/infra/Dockerfile.emba (emacs-gnustep): Add zlib1g-dev.
Remove make instrumentation.

* test/infra/gitlab-ci.yml (build-image-gnustep, test-gnustep): Uncomment.
2023-04-04 20:01:19 +02:00
Michael Albinus
db308233cb Comment out GNUSTEP jobs on EMBA (again)
* test/infra/gitlab-ci.yml (build-image-gnustep, test-gnustep):
Comment out jobs due to bug#62210.
2023-04-04 13:00:51 +02:00
Jim Porter
89e337c3fc ; Make sure 'eshell-command' tests don't prompt the user
* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/background)
(eshell-test/eshell-command/background-pipeline): Wait for the process
to finish.
2023-04-01 10:28:02 -07:00
Eli Zaretskii
46209b2453 ; Fix last change
* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/background-pipeline): Fix last change.
2023-04-01 09:55:29 +03:00
Eli Zaretskii
21a4ee209c Fix new Eshell tests on MS-Windows
* test/lisp/eshell/eshell-tests.el (eshell-test/eshell-command/background)
(eshell-test/eshell-command/background-pipeline): Allow for ".exe"
in the program's name.  This fixes these tests on MS-Windows.
2023-04-01 09:24:38 +03:00
Jim Porter
6419d78fa6 Fix using background commands in 'eshell-command'
Do not merge to master.

This regressed due to the patch for bug#53715, which changed how
Eshell pipelines return the processes in the pipeline (bug#62556).

* lisp/eshell/esh-cmd.el (eshell-eval-command): Allow process-pairs.

* test/lisp/eshell/eshell-tests.el (eshell-test/eshell-command/simple)
(eshell-test/eshell-command/pipeline)
(eshell-test/eshell-command/background)
(eshell-test/eshell-command/background-pipeline): New tests.
2023-03-31 13:07:36 -07:00
Andrea Corallo
ab4273056e Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* test/src/comp-tests.el (61917-1): New test.
	* src/comp.c (syms_of_comp): New variable.
	* lisp/loadup.el: Store primitive arities before dumping.
	* lisp/emacs-lisp/comp.el (comp--func-arity): New function.
	(comp-emit-set-call-subr): Make use of `comp--func-arity'.
2023-03-29 22:25:04 +02:00
Andrea Corallo
a8c9283e17 Revert "Comp fix calls to redefined primtives with op-bytecode (bug#61917)"
This reverts commit 263d6c3853.

These patch series caused a number of regression and more analysis is
required.
2023-03-28 15:47:54 +02:00
Michael Albinus
ba3ade58f3 Skip ruby-ts-imenu-index test if needed
* test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-imenu-index):
Add check for treesitter.
2023-03-28 13:04:09 +02:00
Michael Albinus
9133446db8 Fix Eglot Tramp tests on EMBA
* test/lisp/progmodes/eglot-tests.el (eglot--call-with-tramp-test):
Bind `tramp-allow-unsafe-temporary-files' with t.  (Bug#62289)
2023-03-28 12:43:01 +02:00
Michael Albinus
5b351bc7fa * test/infra/Dockerfile.emba (emacs-gnustep): Instrument "make V=1 ...". 2023-03-28 09:38:07 +02:00
Dmitry Gutov
cbef1422fe ruby-ts-mode: Fix/simplify Imenu index generation
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--full-name): Drop '#'
from the end of resulting string when the node is not a method.
Support 'singleton_method' nodes.
(ruby-ts--imenu-helper): Simplify, to create a "flat" list of
entries, rather than a nested one.  The previous implementation
had problems (like producing a nested structure of full-qualified
names, thus creating a lot of textual repetition), seems easier to
just follow ruby-mode's example here, at least for Emacs 29's
release.

* test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-imenu-index):
New test.
2023-03-27 03:49:13 +03:00
Ken Brown
45b16bfb49 Skip failing tests on Cygwin with native compilation (bug#62450)
* test/Makefile.in (TEST_NATIVE_COMP): New variable, used to
determine whether to run tests tagged with :nativecomp.  Set it to
"no" on Cygwin and to $(HAVE_NATIVE_COMP) otherwise.

* test/lisp/emacs-lisp/benchmark-tests.el (benchmark-tests): Skip
on Cygwin with native-compilation.
2023-03-26 10:04:59 -04:00
Michael Albinus
8b4a494d8d Fix GNUSTEP tests on EMBA
* configure.ac (LIBS_GNUSTEP): Adapt CPPFLAGS and CFLAGS.  (Bug#62210)
Proposed by Po Lu <luangruo@yahoo.com>.

* test/infra/gitlab-ci.yml (build-image-gnustep)
(test-gnustep): Uncomment jobs.
2023-03-26 14:20:05 +02:00
kobarity
8f42db010d Improve indenting "case" in Python
* lisp/progmodes/python.el (python-info-dedenter-statement-p): Do not
consider the first "case" in the block as dedenter.
* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-7)
(python-info-dedenter-statement-p-6): New tests. (Bug#62092)
2023-03-26 05:03:07 +03:00
Ken Brown
c4d490490d ; * test/src/fns-tests.el: Fix last change 2023-03-25 12:54:23 -04:00
Michael Albinus
875e77a66a * test/infra/Dockerfile.emba (emacs-native-comp): Add zlib1g-dev. 2023-03-25 17:33:33 +01:00
Ken Brown
64a2b0d36f Fix failure of fns-tests-collate-strings on Cygwin
* test/src/fns-tests.el (fns-tests-collate-strings): Use
en_XY.UTF-8 instead of en_DE.UTF-8 as an example of an invalid
locale; en_DE.UTF-8 is actually a valid locale on Cygwin.
Note: The test will still fail on Cygwin releases < 3.5
because of a Cygwin bug.  (Bug#62420)
2023-03-25 10:21:20 -04:00
Michael Albinus
db355b420b Use libgccjit-10-dev on EMBA
* test/infra/Dockerfile.emba (emacs-native-comp): Use
libgccjit-10-dev.  (Bug#62211)

* test/infra/gitlab-ci.yml (build-native-comp-speed2)
(test-native-comp-speed2): Uncomment jobs.
2023-03-22 18:34:23 +01:00
Yuan Fu
df669c5a11
Add missing indent rule for c-ts-mode
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New rule for case.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.
2023-03-21 16:24:29 -07:00
Andrea Corallo
263d6c3853 Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Fix compilation
of calls to redefined primtives with dedicated op-bytecode.
* test/src/comp-tests.el (61917-1): New test.
2023-03-20 19:01:26 +01:00
Michael Albinus
786de66ec3 Comment out jobs on EMBA
* test/infra/gitlab-ci.yml: Comment out jobs due to bug#62210 and
bug#62211.
2023-03-20 10:06:05 +01:00
Eli Zaretskii
647c6bf2a6 ; * test/lisp/abbrev-tests.el (abbrev--possibly-save-test): Fix test. 2023-03-18 12:35:10 +02:00
Robert Pluim
aedb9e3ec3 Add tests for Bug#62207
* test/src/keymap-tests.el (keymap-unset-test-remove-and-inheritance):
New test.
2023-03-18 10:37:15 +01:00
Filipp Gunbin
c54bda15e3 Reset abbrevs-changed after saving abbrevs (bug#62208)
* lisp/abbrev.el (abbrev--possibly-save): Reset abbrevs-changed after
saving abbrevs.
* test/lisp/abbrev-tests.el (abbrev--possibly-save-test): New test.
2023-03-17 16:34:30 +03:00
kobarity
5cf1de683b Fix python-fill-paragraph problems on filling strings (bug#62142)
* lisp/progmodes/python.el (python-syntax--context-compiler-macro)
(python-syntax-context): Add single-quoted-string and
triple-quoted-string as TYPE argument.
(python-info-triple-quoted-string-p): New helper function.
(python-fill-paragraph)
(python-fill-string): Use it.
* test/lisp/progmodes/python-tests.el (python-syntax-context-1)
(python-fill-paragraph-single-quoted-string-1)
(python-fill-paragraph-single-quoted-string-2)
(python-fill-paragraph-triple-quoted-string-1)
(python-info-triple-quoted-string-p-1)
(python-info-triple-quoted-string-p-2)
(python-info-triple-quoted-string-p-3): New tests.
2023-03-16 16:59:06 +02:00
Michael Albinus
078cf512ee * test/infra/Dockerfile.emba: Use debian:bullseye. 2023-03-15 16:52:22 +01:00
Michael Albinus
d814c249f4 * test/infra/Dockerfile.emba: Install clangd. 2023-03-15 13:05:19 +01:00