summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* bindat (strz): Write null terminator after variable length stringRichard Hansen2022-06-161-2/+2
| | | | | | | | | * lisp/emacs-lisp/bindat.el (bindat--pack-strz): Explicitly write a null byte after packing a variable-length string to ensure proper termination when packing to a pre-allocated string. * doc/lispref/processes.texi (Bindat Types): Update documentation. * test/lisp/emacs-lisp/bindat-tests.el (bindat-test--str-strz-prealloc): Update tests.
* icalendar-tests no longer assumes TZ = wallPaul Eggert2022-06-151-8/+6
| | | | | | | | | | | | Do not assume that the TZ environment variable is either unset or agrees with /etc/localtime. I ran into this test bug while running ‘TZ=America/Chicago make check’ on a platform where /etc/localtime was America/Los_Angeles. * test/lisp/calendar/icalendar-tests.el: (icalendar-tests--decode-isodatetime): Don’t use set-time-zone-rule, whose doc string says “Instead of calling this function, you typically want something else” for a reason. Instead, pass the zone arg to icalendar-test--format.
* Adjust ibuffer testLars Ingebrigtsen2022-06-151-2/+2
| | | | | * test/lisp/ibuffer-tests.el (ibuffer-format-qualifier): Adjust test after recent formatting changes.
* Normalise setq during macro-expansionMattias Engdegård2022-06-143-1/+13
| | | | | | | | | | | | | | | | | | Early normalisation of setq during macroexpand-all allows later stages, cconv, byte-opt and codegen, to be simplified and duplicated checks to be eliminated. * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Normalise all setq forms to a sequence of (setq VAR EXPR). Emit warnings if necessary. * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): * lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Simplify. * test/lisp/emacs-lisp/bytecomp-tests.el: Adapt and add tests. * test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-nonvariable.el; * test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-odd.el: New files.
* * lisp/simple.el (completion-auto-wrap): Rename from completion-wrap-movement.Juri Linkov2022-06-141-4/+4
| | | | | (next-completion): Use completion-auto-wrap. https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00139.html
* bindat (strz): Error on null byte if packing variable-length stringRichard Hansen2022-06-131-1/+6
| | | | | | * lisp/emacs-lisp/bindat.el (strz): Signal an error if a null byte is encountered while packing a string to a variable-length strz field. * test/lisp/emacs-lisp/bindat-tests.el (strz): Add tests (bug#55938).
* Fix encoding of multibyte ToolTalk filenamesPo Lu2022-06-121-1/+18
| | | | | | | | * lisp/select.el (xselect-convert-to-dt-netfile): Encode file name before computing its tooltalk name, since the indices work on bytes. * test/lisp/dnd-tests.el (dnd-tests-begin-file-drag): Add test.
* bindat (str, strz): Reject non-ASCII, non-`eight-bit' charactersRichard Hansen2022-06-121-0/+16
| | | | | | | | * lisp/emacs-lisp/bindat.el (str) (strz): Signal an error if the user attempts to pack a multibyte string containing characters other than ASCII and `eight-bit' characters (bug#55897). * doc/lispref/processes.texi (Bindat Types): Update documentation. * test/lisp/emacs-lisp/bindat-tests.el (str) (strz): Add tests.
* Bindat: Document `sint`; add `le` arg to `uint`; deprecate `uintr`Stefan Monnier2022-06-111-10/+9
| | | | | | | | | | | | | | | * lisp/emacs-lisp/bindat.el (bindat--type) <uint>: Add `le` optional arg. (bindat--type) <uintr>: Delete method. (uintr): Re-define as a bindat-macro instead. (bindat-type): Update docstring accordingly. (bindat--primitives): Update. (sint): Simplify. * doc/lispref/processes.texi (Bindat Types): Update `uint`, add `sint`, and remove `uintr`. * test/lisp/emacs-lisp/bindat-tests.el (data-bindat-spec): Use the new `le` arg of `uint` instead of `uintr`.
* Don't use 'list' command in Eshell command formsJim Porter2022-06-101-2/+3
| | | | | | | | | | | When executed like a command, 'list' looks for external programs named 'list' first before falling back to the Lisp function of the same name. This causes unexpected behavior, since the Lisp function is what we want in these tests. * test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-cmd-indices) (esh-var-test/quoted-interp-cmd-indices): Use 'listify' instead of 'list'.
* ; bindat-tests (str, strz): Refine testsRichard Hansen2022-06-101-12/+46
| | | | | | | | | | | str and strz: * Add tests for packing into a pre-allocated string. strz: * Add test cases to probe more boundary conditions. * Delete comments that no longer apply. * Add tests to ensure that truncated packed strings are rejected. * Keep the legacy spec tests in sync with the modern spec tests.
* Add tests for x-dnd Motif value parsing logicPo Lu2022-06-101-0/+82
| | | | * test/lisp/x-dnd-tests.el: New file.
* Adjust browse-url test after previous browse-url changeLars Ingebrigtsen2022-06-091-1/+1
|
* Account for remapped faces in $COLUMNS and $LINES in EshellJim Porter2022-06-091-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/window.h (window_body_unit): New enum... (window_body_width): ... use it. * src/window.c (window_body_unit_from_symbol): New function. (window_body_height, window_body_width): Make PIXELWISE a 'window_body_unit'. (window-body-height, window-body-width): Accept 'remap' for PIXELWISE. (window-lines-pixel-dimensions, window_change_record_windows) (run_window_change_functions, resize_frame_windows, grow_mini_window) (shrink_mini_window, scroll-left, scroll-right): Update calls to 'window_body_height' and 'window_body_width'. * src/indent.c (compute_motion): Update calls to 'window_body_width'. * lisp/eshell/em-ls.el (eshell-ls-find-column-widths) (eshell-ls-find-column-lengths): Use 'window-body-width'. * lisp/eshell/esh-var.el (eshell-variable-aliases-list): Use 'window-body-width' and 'window-body-height'. * test/lisp/eshell/esh-var-tests.el (esh-var-test/window-height) (esh-var-test/window-width): Rename to... (esh-var-test/lines-var, esh-var-test/columns-var): ... and update expected value. * doc/lispref/windows.texi (Window Sizes): Document new behavior of PIXELWISE argument for 'window-body-width' and 'window-body-height'. * etc/NEWS: Announce this change (bug#55696).
* Fix dnd-tests on builds without XPo Lu2022-06-091-0/+2
| | | | | * test/lisp/dnd-tests.el (x-get-selection-internal): New function declaration.
* Allow running some DND tests interactivelyPo Lu2022-06-081-53/+87
| | | | | | | | | | | | | | | * src/xselect.c (x_get_local_selection): Respect new variable. (syms_of_xselect): New variable `x-treat-local-requests-remotely'. * test/lisp/dnd-tests.el (x-begin-drag, gui-set-selection): Don't redefine these functions under X. (dnd-tests-verify-selection-data): Use `x-get-selection-internal' under X. (dnd-tests-extract-selection-data): New function. (dnd-tests-begin-text-drag): Update accordingly. (dnd-tests-begin-file-drag, dnd-tests-begin-drag-files): Temporarily skip these tests under X.
* Don't split Eshell expansions by line when using split-subscript operatorJim Porter2022-06-081-1/+8
| | | | | | | | | * lisp/eshell/esh-var.el (eshell-apply-indices): Use 'eshell-convert-to-number' instead of 'eshell-convert'. * test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-convert-var-split-indices): Expand test (bug#55838).
* Factor out test configuration for remote filesMichael Albinus2022-06-085-314/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (tramp-methods) (tramp-default-host-alist): Declare. (ert-remote-temporary-file-directory): New defconst. * test/README: Mention dnd-tests.el. * test/lisp/autorevert-tests.el (auto-revert-test-remote-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'. * test/lisp/dnd-tests.el (ert-x): Require. (dnd-tests-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'. * test/lisp/filenotify-tests.el (file-notify-test-remote-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'. * test/lisp/shadowfile-tests.el (ert-x): Require. (shadow-test-remote-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'. * test/lisp/net/tramp-tests.el: Don't require ert. (ert-remote-temporary-file-directory): Define if it doesn't exist. (tramp-test-temporary-file-directory): Remove. Replace all uses by `ert-remote-temporary-file-directory'.
* Preserve doc string in `byte-compile` (bug#55830)Mattias Engdegård2022-06-081-0/+21
| | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Don't transpose doc string and interactive spec, which must come in this order. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-function-attributes): New test.
* Improve drag-and-drop testsPo Lu2022-06-081-2/+92
| | | | | | | | | | | | | * lisp/dnd.el (dnd-begin-file-drag, dnd-begin-drag-files): Fix type of `x-xdnd-username'. * lisp/select.el (selection-converter-alist): Fix declaration of _DT_NETFILE converter. * test/lisp/dnd-tests.el (dnd-tests-verify-selection-data): Handle "compound" selection converters. (dnd-tests-parse-tt-netfile): New function. (dnd-tests-begin-file-drag, dnd-tests-begin-drag-files): Verify validity of file selection data.
* find-func.el: Fix bug#41104Stefan Monnier2022-06-071-0/+7
| | | | | | | | | * lisp/emacs-lisp/find-func.el (find-function-advised-original): Look at the actual function definition rather than `advice--symbol-function` which sometimes returns only the advice. * test/lisp/emacs-lisp/find-func-tests.el (find-func-tests--find-library-verbose): Add test.
* Add selection stuff to DND testsPo Lu2022-06-071-6/+54
| | | | | | | | | | * test/lisp/dnd-tests.el (dnd-tests-selection-table): New defvar. (gui-set-selection): Actually implement in a way that validates the local value and stores it for future use. (dnd-tests-verify-selection-data): New function. (dnd-tests-begin-text-drag): Add tests for the contents of various selections.
* Add new drag-and-drop testPo Lu2022-06-071-2/+11
| | | | | * test/lisp/dnd-tests.el (dnd-tests-get-local-file-uri): New test.
* Allow using xref buttons in non-*Help* buffersStephen Berman2022-06-061-5/+0
| | | | | | * lisp/help-mode.el (help-buffer): Allow using the xref buttons in non-*Help* buffers (bug#8147) (but display the result in a *Help* buffer).
* Add drag-and-drop API testsPo Lu2022-06-061-0/+198
| | | | | | | * test/lisp/dnd-tests.el: New file. (dnd-tests-begin-text-drag): (dnd-tests-begin-file-drag): (dnd-tests-begin-drag-files): New tests.
* Test warning suppressions with lexical bindingMattias Engdegård2022-06-061-6/+14
| | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load): Add lexical cookie to file being compiled as part of the test. (bytecomp-test--with-suppressed-warnings): Comment out the test for suppressing warnings when attempting to let-bind `nil`, as that (1) doesn't work and (2) is a silly thing to do anyway.
* Don't generate separate autoload file for htmlfontifyStefan Kangas2022-06-051-9/+0
| | | | | | | | * lisp/hfy-cmap.el: Update file local to no longer put htmlfontify autoloads in htmlfontify-loaddefs.el. * lisp/htmlfontify.el (htmlfontify-loaddefs): Don't require. * test/lisp/htmlfontify-tests.el (htmlfontify-autoload): Delete test (bug#52400).
* Fix sorting in ls-lisp.el under -vEli Zaretskii2022-06-051-0/+39
| | | | | | | | | * lisp/ls-lisp.el (ls-lisp-version-lessp): Handle correctly the case where strings begin with numerical parts. More faithful implementation of the 'strverscmp' spec for fractional parts. (Bug#55787) * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug55787): New test.
* Fix Tramp testMichael Albinus2022-06-031-0/+1
| | | | | * test/lisp/net/tramp-tests.el (tramp-test31-signal-process): Skip on MS Windows.
* Reinstate the Qload file name handlerLars Ingebrigtsen2022-06-021-2/+1
| | | | | * src/lread.c (Fload): Reinstate the Qload file name handler (bug#12598). This makes loading non-ASCII elc.gz files work.
* Merge remote-tracking branch 'refs/remotes/origin/master'Stefan Monnier2022-06-011-4/+12
|\
| * Make files-tests.el more robustMichael Albinus2022-06-011-4/+12
| | | | | | | | | | | | * test/lisp/files-tests.el (files-tests--with-temp-non-special) (files-tests--with-temp-non-special-and-file-name-handler): Make it more robust wrt parallel test jobs. (Bug#55706)
* | bindat (strz): Fix wrong-type-argument error when unpackingRichard Hansen2022-06-011-1/+0
| | | | | | | | | | | | | | * lisp/emacs-lisp/bindat.el (strz): Fix (wrong-type-argument number-or-marker-p nil) error when unpacking a strz with unspecified (variable) length. * test/lisp/emacs-lisp/bindat-tests.el (strz): Mark test as passing.
* | bindat (strz): Fix off-by-one bug in computed lengthRichard Hansen2022-06-011-2/+0
| | | | | | | | | | | | * lisp/emacs-lisp/bindat.el (strz): Include null terminator when computing packed string length. * test/lisp/emacs-lisp/bindat-tests.el (strz): Mark tests as passing.
* | ; bindat-tests (strz): Add more testsRichard Hansen2022-06-011-0/+69
|/
* Add a last-modified field when a bookmark is setManuel Giraud2022-05-311-9/+21
| | | | | | | | | | | | | * test/lisp/bookmark-tests.el (bookmark-tests-make-record) (bookmark-tests-make-record-list, bookmark-tests-set): fix tests to not consider last-modified in bookmark equality. * lisp/bookmark.el (bookmark-make-record-default): add a last-modified field. (bookmark-sort-flag): add the 'last-modified choice. (bookmark-get-last-modified): new function to get last-modified bookmark field. (bookmark-maybe-sort-alist): sort in last-modified first order. (bookmark-completing-read): use `bookmark-maybe-sort-alist'.
* Speed up generation of loaddefs filesLars Ingebrigtsen2022-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/loading.texi (Autoload, Autoload by Prefix): Refer to loaddefs-generate instead of update-file-autoloads. * lisp/Makefile.in (LOADDEFS): Remove, because all the loaddefs files are created in one go now. (COMPILE_FIRST): Add loaddefs-gen/radix-tree, and drop autoload. ($(lisp)/loaddefs.el): Use loaddefs-gen. (MH_E_DIR, $(TRAMP_DIR)/tramp-loaddefs.el) ($(MH_E_DIR)/mh-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el) ($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el): Remove. * lisp/generic-x.el: Inhibit computing prefixes, because the namespace here is all wonky. * lisp/w32-fns.el (w32-batch-update-autoloads): Removed -- unused function. * lisp/calendar/holidays.el ("holiday-loaddefs"): Renamed from hol-loaddefs to have a more regular name. * lisp/cedet/ede/proj-elisp.el (ede-emacs-cedet-autogen-compiler): Refer to loaddefs-gen instead of autoload. * lisp/emacs-lisp/autoload.el (make-autoload, autoload-rubric) (autoload-insert-section-header): Made into aliases of loaddefs-gen functions. (autoload--make-defs-autoload): Ditto. (autoload-ignored-definitions, autoload-compute-prefixes): Moved to loaddefs-gen. * lisp/emacs-lisp/lisp-mode.el (lisp-mode-autoload-regexp): New constant. (lisp-fdefs, lisp-mode-variables, lisp-outline-level): Use it to recognize all ;;;###autoload forms. * lisp/emacs-lisp/loaddefs-gen.el: New file. * lisp/emacs-lisp/package.el: Use loaddefs-generate instead of make-directory-autoloads. * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads): Use loaddefs instead of autoloads.
* Merge from origin/emacs-28Stefan Kangas2022-05-301-0/+1
|\ | | | | | | 1b7b69e764 Some Tramp cleanup on MS Windows
| * Some Tramp cleanup on MS WindowsMichael Albinus2022-05-291-0/+1
| | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-restricted-shell-hosts-alist): Do not add localhost when `tramp-encoding-shell' is a POSIX shell. * test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process): Skip on MS Windows.
| * Fix Tramp sshfs tests (don't merge)Michael Albinus2022-05-171-5/+11
| | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare. (tramp-test16-directory-files) (tramp-test16-file-expand-wildcards) (tramp-test26-file-name-completion, tramp--test-check-files): Use it. (tramp--test-check-files): Delete directory recursively.
| * * test/lisp/net/tramp-tests.el (tramp-test27-load): Adapt test. Don't mergeMichael Albinus2022-05-151-1/+3
| |
* | ISO 8601 strings sans "Z" don’t specify DST flagPaul Eggert2022-05-291-10/+10
| | | | | | | | | | | | | | | | * lisp/calendar/iso8601.el (iso8601--zone-dst): New function. (iso8601-parse, iso8601-parse-time): Use it. (iso8601--decoded-time): Default dst to -1, not nil. * test/lisp/calendar/iso8601-tests.el (test-iso8601-combined) (standard-test-time-of-day-zone): Adjust to new behavior.
* | Fix Python Hideshow problem with backslash escaped newlineskobarity2022-05-281-0/+54
| | | | | | | | | | | | | | * lisp/progmodes/python.el (python-rx) (python-nav-beginning-of-defun-regexp): Allow python-nav-*-defun to handle backslash escaped newlines (bug#55690).
* | Fix navigation in the *Completions* buffer and enable more tests (bug#54374)Juri Linkov2022-05-271-28/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/ido.el: Use first-completion instead of next-completion. * lisp/minibuffer.el (completion--insert): Put completion--string text property on prefix and suffix as well. * lisp/simple.el (first-completion, last-completion): New commands. (next-completion): Rewrite to fix many bugs reported in bug#54374, bug#55289, bug#55430. (choose-completion): Use the text property completion--string that allows to select a completion when point is on its prefix or suffix. (switch-to-completions): Use first-completion instead of next-completion, and last-completion instead of previous-completion. * test/lisp/minibuffer-tests.el (completion-auto-select-test) (completion-auto-wrap-test, completions-header-format-test) (completions-affixation-navigation-test): Uncomment fixed lines.
* | Test suite for Completions UI (bug#54374)Juri Linkov2022-05-261-0/+123
| | | | | | | | | | | | | | | | * test/lisp/minibuffer-tests.el (completing-read-with-minibuffer-setup): New macro based on xdisp-tests--in-minibuffer. (completion-auto-help-test, completion-auto-select-test) (completion-auto-wrap-test, completions-header-format-test) (completions-affixation-navigation-test): New tests.
* | * test/lisp/files-resources/compile-utf8.el: Use lexical-bindingStefan Monnier2022-05-261-0/+1
| |
* | Reset 'eshell-in-pipeline-p' when interpolating commandsJim Porter2022-05-251-0/+29
| | | | | | | | | | | | | | | | | | * lisp/eshell/esh-cmd.el (eshell-subcommand-bindings) (eshell-command-to-value): Set 'eshell-in-pipeline-p' to nil. * test/lisp/eshell/eshell-tests.el (eshell-test/subcommand-reset-in-pipeline) (eshell-test/lisp-reset-in-pipeline): New tests (bug#55620).
* | ; Fix inevitable failure in erc-dcc testF. Jason Park2022-05-241-37/+39
| | | | | | | | | | | | * test/lisp/erc/erc-dcc-tests.el (erc-dcc-tests--dcc-handle-ctcp-send): Shadow hook to prevent the erc-button module from interfering with tests that use this helper.
* | Keep subcommands in pipelines from clobbering the head/tail processesJim Porter2022-05-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/esh-cmd.el (eshell-execute-pipeline): Use 'make-symbol' for headproc and tailproc. (eshell-do-pipelines, eshell-do-pipelines-synchronously): Adapt to the above. * test/lisp/eshell/eshell-tests.el (eshell-test/pipe-subcommand) (eshell-test/pipe-subcommand-with-pipe): New test. * doc/misc/eshell.texi (Bugs and ideas): Remove item about piping to process from loop; this commit fixes it (bug#55590).
* | Recognize DCC SSEND when receiving files in erc-dccF. Jason Park2022-05-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * lips/erc/erc-dcc.el (erc-dcc-open-network-stream): Use TLS for new connections when :secure flag is set. (erc-dcc-do-GET-command): Set secure flag when user explicitly passes an "-s" option. (erc-dcc-do-LIST-command): Show an "s" to indicate a secure connection when applicable. (erc-dcc-query-handler-alist): Add extra items for "SSEND", etc. (erc-dcc-handle-ctcp-send): Set secure flag when a leading "S" appears in the command type.