summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Make new fileio test more reliableLars Ingebrigtsen2022-06-111-0/+1
| | | | | * test/src/fileio-tests.el: Use a unibyte buffer to avoid length confusion.
* fileio-tests.el (test-non-regular-insert): Fix thinkoStefan Monnier2022-06-111-3/+3
| | | | | | * test/src/fileio-tests.el (fileio-tests--non-regular-insert): Rename from `test-non-regular-insert` and make it into a test rather than a broken function. Oh, and make it work while at it.
* 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`.
* Allow inserting parts of /dev/urandom with insert-file-contentsLars Ingebrigtsen2022-06-111-0/+7
| | | | | | * doc/lispref/files.texi (Reading from Files): Document it. * src/fileio.c (Finsert_file_contents): Allow specifying END for special files (bug#18370).
* 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.
* Merge from origin/emacs-28Stefan Kangas2022-06-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | d02c94090c Fix error reporting in process-async-https-with-delay 9a4862a973 * doc/misc/org.org: Remove spurious markup. 768ed1476a Make Tramp version check more robust 7f778c6943 Fix debugging with GDB when a breakpoint has multiple loca... 25e53e9391 ; * lisp/files.el (file-expand-wildcards): Doc fix. 3ea9357d10 Update documentation of 'aset' and 'store-substring' # Conflicts: # lisp/files.el
| * Fix error reporting in process-async-https-with-delayKen Brown2022-06-081-1/+1
| | | | | | | | | | | | * test/src/process-tests.el (process-async-https-with-delay): Use 'plist-get' instead of 'assq' in testing for a connection error. The 'status' variable is a plist, not an alist. (Bug#55849)
* | Add tests for x-dnd Motif value parsing logicPo Lu2022-06-101-0/+82
| | | | | | | | * test/lisp/x-dnd-tests.el: New file.
* | Update the 'etags' test suiteEli Zaretskii2022-06-096-2742/+2742
| | | | | | | | | | | | | | | | | | | | | | | | * ETAGS.good_1: * ETAGS_good_2: * ETAGS_good_3: * ETAGS_good_4: * ETAGS_good_5: * ETAGS_good_6: Adapt to recent changes in test sources. * lib-src/etags.c (C_entries): Add commentary for resetting bracelev. (Bug#45246)
* | 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-086-319/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Let ?\LF signal an error (bug#55738)Mattias Engdegård2022-06-031-2/+2
| | | | | | | | | | | | | | | | | | As suggested by Stefan Monnier. * src/lread.c (read_escape): Signal an error for ?\LF since it cannot reasonably be intended. * test/src/lread-tests.el (lread-escaped-lf): Update test. * etc/NEWS: Announce.
* | Make ?\LF generate 10, not -1 (bug#55738)Mattias Engdegård2022-06-021-0/+5
| | | | | | | | | | | | | | | | | | | | The old -1 value was an artefact of the reader implementation. * src/lread.c (read_escape): Remove the `stringp` argument; assume character literal syntax. Never return -1. (read_string_literal): Handle string-specific escape semantics here and simplify. * test/src/lread-tests.el (lread-escaped-lf): New test.
* | 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
|\ \
| * | Revert "Fix reader char escape bugs (bug#55738)"Mattias Engdegård2022-06-011-10/+0
| | | | | | | | | | | | | | | | | | This reverts commit c50718dcfa54293b695f8a3fa5cd4d77848ee084. It may have caused bootstrap problems. Sorry about that.
| * | Fix reader char escape bugs (bug#55738)Mattias Engdegård2022-06-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the character literal ?\LF (linefeed) generate 10, not -1. Ensure that Control escape sequences in character literals are idempotent: ?\C-\C-a and ?\^\^a mean the same thing as ?\C-a and ?\^a, generating the control character with value 1. "\C-\C-a" no longer signals an error. * src/lread.c (read_escape): Make nonrecursive and only combine the base char with modifiers at the end, creating control chars if applicable. Remove the `stringp` argument; assume character literal syntax. Never return -1. (read_string_literal): Handle string-specific escape semantics here and simplify. * test/src/lread-tests.el (lread-misc-2): New test.
| * | 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.
* | Nonrecursive Lisp reader (bug#55676)Mattias Engdegård2022-05-301-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restructure the reader to be nonrecursive so that it is not limited by the C stack or crashes Emacs when reading deeply nested data. This also improves performance. A few minor bugs were fixed: - (a .{NBSP}b) where {NBSP} is a non-breaking space (U+00A0) is now the dotted pair (a . b), not the 3-element list (a \. b), since U+00A0 is treated as whitespace everywhere else. - #_ with no symbol following is now equivalent to ## (empty interned symbol), not #: (empty uninterned symbol). * src/alloc.c (garbage_collect): Call mark_lread. * src/lread.c (readevalloop): Use read0 instead of read_list. (stackbufsize): Increase to 1024, now that read0 isn't recursive. (invalid_radix_integer): Buffer overflow check. (read1, read_list, read_vector): Remove. (read_char_literal, read_string_literal) (hash_table_from_plist, record_from_list, vector_from_rev_list) (bytecode_from_rev_list, char_table_from_rev_list) (sub_char_table_from_rev_list, string_props_from_rev_list) (read_bool_vector, skip_lazy_string, symbol_char_span) (skip_space_and_comments) (enum read_entry_type, struct read_stack_entry, struct read_stack) (rdstack, mark_lread, read_stack_top, read_stack_pop) (read_stack_empty_p, grow_read_stack, read_stack_push): New. (read0): Rewrite to be nonrecursive. * test/src/lread-tests.el (lread-deeply-nested, lread-misc): New tests.
* | Fix atimer setting and overdue expiration (bug#55628)Mattias Engdegård2022-05-301-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/atimer.c (set_alarm): If the atimer has already expired, signal it right away instead of postponing it further. Previously this could occur repeatedly, blocking atimers indefinitely. Also only use `alarm` as fallback if `setitimer` is unavailable, not both at the same time (which makes no sense, and they both typically use the same mechanism behind the curtains). * test/src/eval-tests.el (eval-tests/funcall-with-delayed-message): New test, verifying proper functioning of funcall-with-delayed-message which also serves as test for this bug (which also caused debug-timer-check to fail, but that test is only run when Emacs is built with enable-checking).
* | 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.