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

6437 Commits

Author SHA1 Message Date
Robert Pluim
6bc3800000 Ensure ucs-names is consistent with Unicode names
* lisp/international/mule-cmds.el (ucs-names): Skip adding an old-name
if it conflicts with the offical name of a codepoint.  Adjust the
ranges iterated over to account for new Unicode codepoints.
* test/lisp/international/mule-tests.el
(mule-cmds-tests--ucs-names-old-name-override,
mule-cmds-tests--ucs-names-missing-names): New tests for checking
'ucs-names' consistency.

Bug#65997
2023-09-18 11:55:10 +02:00
Eli Zaretskii
cbd8fac283 Fix Unicode normalization of characters
* lisp/international/ucs-normalize.el
(ucs-normalize-composition-exclusions, check-range): Update from
Unicode 15.0 data.  (Bug#65996)

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update to reflect
changes in ucs-normalize.el.

* admin/notes/unicode: Mention the updates in ucs-normalize.el.
2023-09-16 12:17:23 +03:00
Stefan Monnier
0065621d0d (report_overlay_modification): Fix bug#65929
Somehow the new overlay code in Emacs-29 changed slightly
the test to decide when to run the `modification-hooks` of overlays,
with the consequence that these hook functions end up being executed
also when text is deleted right after an empty overlay, which is
contrary to Emacs-28 behavior as well as contrary to the Texinfo doc.

* src/buffer.c (report_overlay_modification): Better reproduce the
Emacs-28 code.

* test/src/buffer-tests.el (overlay-modification-hooks):
Add corresponding test.
2023-09-13 18:49:55 -04:00
Jim Porter
2af092741e Fix remote path setting in Eshell
This ensures that we supply Tramp with the local PATH so that it can
do its job of starting the local "ssh", or whatever the method uses
(bug#65551).

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Add special
handling for remote processes.

* test/lisp/eshell/esh-proc-tests.el
(esh-var-test/remote/remote-path): New test.
2023-09-07 10:23:48 -07:00
Stefan Monnier
80bdcf8f35 (regexp-tests-backtrack-optimization): Mark it as failing
* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
The fix for bug#65726 broke some of the optimization added for bug#61514.
2023-09-05 10:54:25 -04:00
Mattias Engdegård
8a9e653cc8 ; Add regression test for bug#65726
* test/src/regex-emacs-tests.el
(regex-tests-mutual-exclusive-inf-rec): New test.
2023-09-05 15:39:29 +02:00
Eli Zaretskii
a219ee8c31 Fix minor bugs in vc-git and vc-hg on Windows uncovered by vc-tests
* lisp/vc/vc-hg.el (vc-hg-state-slow): Non-existing files emit a
different message on MS-Windows; support that.
* lisp/vc/vc-git.el (vc-git-checkin): Make sure
'default-directory' is not nil when calling
'make-nearby-temp-file' on MS-Windows.

* test/lisp/vc/vc-tests.el (vc-test--version-diff): Run
'default-directory' through 'file-truename', otherwise the
'vc-test-cvs06-version-diff' test might fail on MS-Windows.
2023-09-01 16:08:36 +03:00
Jim Porter
bc0426ce8e Don't add an extraneous slash in remote PATH list in Eshell
Previously, in a remote directory, '(eshell-get-path)' would return a
list of strings like "/ssh:localhost://usr/bin".  While that shouldn't
break most things, it's not strictly correct either.  See bug#65551.

* lisp/eshell/esh-util.el (eshell-get-path): Use 'concat' instead of
'file-name-concat'.

* test/lisp/eshell/esh-util-tests.el: Require 'tramp' and
'eshell-tests-helpers'.
(esh-util-test/path/get, eshell-util-test/path/get-remote): New tests.
2023-08-27 12:49:25 -07:00
Stefan Kangas
45cc57ac25 ; Silence byte-compiler
* test/src/comp-tests.el (native-comp-eln-load-path): Declare.

(cherry picked from commit 508d24c8b9)
2023-08-20 20:05:26 +02:00
Michael Albinus
bccf848b26 Adapt Tramp test
* test/lisp/net/tramp-tests.el (tramp-test41-special-characters):
Skip for macOS.
2023-08-10 12:17:59 +02:00
Andrea Corallo
b93107c20b Fix emacs-lisp-native-compile-and-load eln target directory (bug#64226)
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Don't use
`byte+native-compile' to select output directory but always axpect
it explicit through `native-compile-target-directory'.
(batch-byte+native-compile): Set `native-compile-target-directory'.
* test/src/comp-tests.el (comp-tests-bootstrap): Set
`native-compile-target-directory'.
2023-08-09 15:19:26 +02:00
Eli Zaretskii
7e3c616086 ; Re-enable the /dev/urandom test
* test/src/fileio-tests.el (fileio-tests--non-regular-insert):
Remove :unstable, but comment out the single failing test.
2023-08-09 07:25:59 -04:00
Mattias Engdegård
ff21717f05 Disable failing test (bug#65156)
* test/src/fileio-tests.el (fileio-tests--non-regular-insert):
Mark as :unstable, since /dev/urandom is seekable.

Do not merge to master.
2023-08-09 10:23:28 +02:00
Michael Albinus
495bee253f * test/lisp/net/tramp-tests.el (tramp-test42-utf8): Skip for macOS. 2023-08-06 16:24:19 +02:00
Michael Albinus
de1effd73b ; Fix last change 2023-08-06 15:46:58 +02:00
Michael Albinus
7c7966862b * test/lisp/net/tramp-tests.el (tramp-test10-write-region): Extend test. 2023-08-06 14:30:57 +02:00
Michael Albinus
2695af297e Sync with Tramp 2.6.2-pre
* doc/misc/tramp.texi (Overview): Use "scp" in example.
(Obtaining @value{tramp}): Prefer https: to git: URIs on Savannah.
(Ssh setup): Extend for MS Windows and ssh.  Explain
tramp-use-ssh-controlmaster-options value `suppress'.
(File name completion): Remove completion styles restrictions.
(Ad-hoc multi-hops): Describe tramp-show-ad-hoc-proxies.
(Remote processes): Add reference to "Using ssh connection sharing".

* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Set to "2.6.2-pre".

* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-archive.el
(tramp-archive-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions): Return nil when
DIRECTORY is missing.  (Bug#61890)

* lisp/net/tramp.el (tramp-accept-process-output): Don't use TIMEOUT
anymore, default it to 0.  When the connection uses a shared
socket possibly, accept also the output from other processes over
the same connection.  (Bug#61350)
(tramp-handle-file-notify-rm-watch, tramp-action-process-alive)
(tramp-action-out-of-band, tramp-process-one-action)
(tramp-interrupt-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
* lisp/net/tramp-smb.el (tramp-smb-action-get-acl)
(tramp-smb-action-set-acl, tramp-smb-wait-for-output):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo): Adapt callees.

* lisp/net/tramp.el (tramp-get-process, tramp-message)
(tramp-handle-make-process, tramp-handle-file-notify-valid-p)
(tramp-process-actions, tramp-accept-process-output)
(tramp-process-sentinel, tramp-read-passwd)
(tramp-interrupt-process, tramp-signal-process):
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
* lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-process-filter)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gio-monitor-process-filter)
(tramp-sh-inotifywait-process-filter)
(tramp-barf-if-no-shell-prompt, tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl)
(tramp-smb-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection)
(tramp-sudoedit-send-command): Prefix internal process properties
with "tramp-".

* lisp/net/tramp.el (tramp-skeleton-file-exists-p): New defmacro,
which also handles host name completion.
(tramp-handle-file-exists-p):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-exists-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-exists-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-exists-p): Use it.

* lisp/net/tramp.el (tramp-wrong-passwd-regexp):
* lisp/net/tramp-adb.el (tramp-adb-prompt):
* lisp/net/tramp-sh.el (tramp-sh-inotifywait-process-filter):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Unify regexps.

* lisp/net/tramp.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el: Fix error messages.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
Protect `delete-process'.

* lisp/net/tramp.el (tramp-prefix-format, tramp-prefix-regexp)
(tramp-method-regexp, tramp-postfix-method-format)
(tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
(tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
(tramp-postfix-ipv6-regexp, tramp-postfix-host-format)
(tramp-postfix-host-regexp, tramp-remote-file-name-spec-regexp)
(tramp-file-name-structure, tramp-file-name-regexp)
(tramp-completion-method-regexp)
(tramp-completion-file-name-regexp):
* lisp/net/tramp-compat.el (tramp-syntax):
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector):
Rearrange declarations.

* lisp/net/tramp-compat.el (ansi-color): Require.
(ls-lisp): Don't require.  (Bug#64124)
(tramp-compat-replace-regexp-in-region): Move up.
(tramp-compat-length<, tramp-compat-length>)
(tramp-compat-length=): New defaliases.
(tramp-compat-file-name-unquote, tramp-compat-take)
(tramp-compat-ntake): Use them.

* lisp/net/tramp-container.el (tramp-container--completion-function):
Rename from `tramp-docker--completion-function'.  Add argument
PROGRAM.  Use it for "docker" and "podman" host name completion.

* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-exists-p):
New defun.
(tramp-crypt-file-name-handler-alist): Add it.

* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-exists-p): New defun.
(tramp-fuse-mount-timeout): Move up.
(tramp-fuse-mount-point): Use `tramp-fuse-mount-timeout'.
(tramp-fuse-unmount): Flush "mount-point" file property.
(tramp-fuse-mount-point, tramp-fuse-mounted-p): Support existing
mount points.
(tramp-fuse-mounted-p): The mount-spec could contain an optional
trailing slash.  (Bug#64278)

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
Improve stability for WebDAV.
(tramp-rclone-handle-file-system-info): Check return code of
command.

* lisp/net/tramp-gvfs.el (while-no-input-ignore-events):
Add `dbus-event' for older Emacs versions.
(tramp-gvfs-parse-device-names): Ignore errors.

* lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp)
(tramp-device-escape-sequence-regexp): Delete.
(tramp-sh-handle-insert-directory, tramp-barf-if-no-shell-prompt)
(tramp-wait-for-output): Use `ansi-color-control-seq-regexp'.
(tramp-use-ssh-controlmaster-options): Allow new value `suppress'.
(tramp-ssh-option-exists-p): New defun.
(tramp-ssh-controlmaster-options): Implement `suppress' actions.
Should never return nil, but empty string.
(tramp-perl-file-name-all-completions): Don't print status message.
(tramp-sh-handle-file-name-all-completions): Return nil when check
fails.  (Bug#61890)
(tramp-run-test): Add VEC argument.
(tramp-sh-handle-file-executable-p)
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-directory-p)
(tramp-sh-handle-file-writable-p): Adapt callees.
(tramp-sh-handle-insert-directory):
(tramp-sh-handle-insert-directory): Test whether -N is understood
by ls since that option is used along with --dired.  Remove -N
when we remove --dired.  (Bug#63142)
(tramp-sh-handle-insert-directory, tramp-barf-if-no-shell-prompt)
(tramp-wait-for-output): Use `ansi-color-control-seq-regexp'.
(tramp-sh-handle-expand-file-name): `null-device' could be nil.
Reported by Richard Copley <rcopley@gmail.com>.
(tramp-sh-handle-make-process): Improve handling of
connection-type `pipe'.  (Bug#61341)

* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link):
Flush TARGET file properties.

* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): Flush proper
file properties.
(tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl):
Remove superfluous `unwind-protect'.

* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-fuse-handle-file-exists-p'.
(tramp-sshfs-handle-insert-file-contents): Move result out of
unwindform.

* lisp/net/tramp.el (tramp-string-empty-or-nil-p): New defsubst.
Use it everywhere when appropriate.

* lisp/net/tramp.el (tramp-methods) <->: Add.
(tramp-completion-file-name-handler-alist):
Add `expand-file-name', `file-exists-p', `file-name-directory' and
`file-name-nondirectory'.
(tramp-dissect-file-name): Do not extra check for
`tramp-default-method-marker'.
(tramp-completion-handle-expand-file-name)
(tramp-completion-handle-file-exists-p)
(tramp-completion-handle-file-name-directory)
(tramp-completion-handle-file-name-nondirectory): New defuns.
(tramp-completion-handle-file-name-all-completions): Remove duplicates.
(tramp-show-ad-hoc-proxies): New defcustom.
(tramp-make-tramp-file-name): Use it.
(tramp-make-tramp-hop-name): Don't add hop twice.
(tramp-shell-prompt-pattern): Remove escape characters.
(tramp-process-one-action, tramp-convert-file-attributes):
Use `ansi-color-control-seq-regexp'.  (Bug#63539)
(tramp-wrong-passwd-regexp): Add "Authentication failed" string
(from doas).
(tramp-terminal-type): Fix docstring.
(tramp-process-one-action): Delete ANSI control escape sequences
in buffer.  (Bug#63539)
(tramp-build-completion-file-name-regexp): Support user name
completion.
(tramp-make-tramp-file-name): Keep hop while in file
(tramp-set-completion-function): Check, that cdr of FUNCTION-LIST
entries is a string.
(tramp-completion-file-name-handler): Run only when
`minibuffer-completing-file-name' is non-nil.
(tramp-skeleton-write-region): Fix scoping.  (Bug#65022)
(tramp-handle-memory-info): Work on newly created objects, or use
non-destructive operations.
(tramp-accept-process-output): Use `with-local-quit'.
(tramp-call-process, tramp-call-process-region):
Let-bind `temporary-file-directory'.

* test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs28-p):
New defun.
(tramp-archive-test16-directory-files): Don't mutate.
(tramp-archive-test47-auto-load): Adapt test.

* test/lisp/net/tramp-tests.el (tramp-display-escape-sequence-regexp):
Dont't declare.
(tramp-action-yesno): Suppress run in tests.
(tramp-test02-file-name-dissect):
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate): Adapt tests.
(tramp-test21-file-links):
(tramp-test21-file-links, tramp-test26-file-name-completion)
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test33-environment-variables)
(tramp-test38-find-backup-file-name, tramp-test47-auto-load)
(tramp-test39-detect-external-change, tramp-test42-utf8)
(tramp-test47-auto-load, tramp-test47-delay-load)
(tramp-test48-unload): Adapt tests.
(tramp-test26-file-name-completion-with-perl):
(tramp-test26-file-name-completion-with-ls)
(tramp-test26-interactive-file-name-completion): New tests.
(tramp-test44-asynchronous-requests): Mark as :unstable.
2023-08-05 18:07:58 +02:00
Mattias Engdegård
2b8796eea1 Fix rx wrong-code bug: ranges starting with ^
(rx (in (?^ . ?a))) was incorrectly translated to "[^-a]".
Change it so that we get "[_-a^]" instead.

* lisp/emacs-lisp/rx.el (rx--generate-alt): Split ranges starting with
`^` occurring first in a non-negated character alternative.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Add and adapt tests.

(cherry picked from commit 5f5d668ac7)
2023-07-30 18:12:19 +02:00
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