aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Port new tests to leap seconds or (TICKS . HZ)Paul Eggert2022-04-141-33/+15
| | | | | | * test/lisp/mail/ietf-drums-date-tests.el (ietf-drums-date-tests): Don’t assume leap seconds are ignored, or that timestamps are in (HI LO) format.
* Make list-times not include zero elementsLars Ingebrigtsen2022-04-131-2/+7
| | | | | | | | | * doc/lispref/os.texi (Time Parsing): Mention %x. * lisp/calendar/time-date.el (format-seconds): Accept a new %x spec that removes trailing zeros (bug#54904). * lisp/emacs-lisp/timer-list.el (list-timers): Don't display trailing zero bits.
* Adapt macOS defaults in Tramp's process-attributes implementationMichael Albinus2022-04-121-0/+45
| | | | | | | | | | | | * doc/misc/tramp.texi (Remote processes): Mention tramp-connection-local-darwin-ps-* constants. * lisp/net/tramp-integration.el (tramp-connection-local-darwin-ps-variables): Fix docstring. (top): Simplify setting local profiles. * test/lisp/net/tramp-tests.el (tramp-test31-list-system-processes) (tramp-test31-process-attributes): New tests.
* Recognise hybrid IPv6/IPv4 addresses in textsec (bug#54624)Mattias Engdegård2022-04-111-1/+4
| | | | | | | | | * lisp/international/textsec.el (textsec--ipvx-address-p): Recognise hybrid addresses like "::ffff:129.55.2.201". Combine to a single regexp and translate to rx. Remove some regexp ambiguity (relint complaint). * test/lisp/international/textsec-tests.el (test-suspiction-domain): Add test cases.
* ses-test Prefix used symbols by ses--Vincent Belaïche2022-04-101-37/+37
| | | | | * test/lisp/ses-tests.el: Rename cell symbols of renamed cells so that they are in the SES namespace, as recommended by Stefan.
* OClosure: New function `function-documentation`Stefan Monnier2022-04-071-0/+1
| | | | | | | | | | | | | | | | | | As mentioned in the original OClosure commit, OClosures (ab)use the bytecode's docstring slot to hold the OClosure's type. This currently prevents OClosures from having their own docstring. Introduce a new generic function `function-documentation` to fetch the docstring of a function, which can then be implemented in various different ways depending on the OClosure's type. * lisp/simple.el (function-documentation): New generic function. (bad-package-check): Strength-reduce `eval` to `symbol-value`. * src/doc.c (Fdocumentation): Use it. * lisp/emacs-lisp/oclosure.el (oclosure--accessor-docstring): New function. * test/lisp/emacs-lisp/oclosure-tests.el (oclosure-test): Add test for accessor's docstrings.
* Fix ses-tests.elVincent Belaïche2022-04-061-37/+44
| | | | | | | | * lisp/ses.el (ses-jump-cell-name-function): Docstring typo. * test/lisp/ses-tests.el (ses--cells, foo, bar, B2, toto): Do not do any outer defvar, but set the defvar only under the with-suppressed-warnings directive to silence the byte-compiler.
* * test/lisp/ses-tests.el: Require ert-x, for ert-simulate-keys.Glenn Morris2022-04-051-0/+1
|
* * test/lisp/replace-tests.el: New tests for query-replace (bug#54733)Juri Linkov2022-04-051-0/+66
| | | | | | * test/lisp/replace-tests.el (query-replace-tests): New defconst. (query-replace--perform-tests): New function. (query-replace-tests, query-replace-search-function-tests): New ert-deftest.
* OClosure: add support for `slot-value`Stefan Monnier2022-04-041-1/+18
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/oclosure.el (oclosure--slot-index) (oclosure--slot-value, oclosure--set-slot-value): New functions. * lisp/emacs-lisp/eieio-core.el (eieio-oset, eieio-oref): Consolidate the type test. Use `oclosure--(set-)slot-value`. (eieio--validate-slot-value, eieio--validate-class-slot-value): Don't presume `class` is an EIEIO class. (eieio--class): Fix bogus `:type` info. (eieio--object-class): Simplify. (eieio--known-slot-name-p): New function. (eieio-oref, eieio-oref-default, eieio-oset-default): Use it. * test/lisp/emacs-lisp/oclosure-tests.el: Require `eieio`. (oclosure-test): Make `name` field mutable. (oclosure-test-slot-value): New test.
* SES with case insensitive cell names for jumping.Vincent Belaïche2022-04-041-0/+55
| | | | | | | | | | | | | | | * doc/misc/ses.texi (The Basics): Document that ses-jump may be customized. (Customizing @acronym{SES}): Document new customisations for ses-jump. * lisp/ses.el (ses-jump-cell-name-function) (ses-jump-prefix-function): New defcustoms. (ses-jump-prefix): New defun. (ses-jump): Make ses-jump use the new defcustoms. * test/lisp/ses-tests.el (ses-jump-B2-prefix-arg) (ses-jump-B2-lowcase, ses-jump-B2-lowcase-keys) (ses-jump-B2-symbol, ses-jump-B2-renamed): New tests.
* test/lisp/edmacro-tests.el: Adjust to recent changesStefan Monnier2022-04-041-13/+14
|
* Fix handling of '\\' inside double-quotes in EshellJim Porter2022-04-031-2/+2
| | | | | | | | | | | | | | Previously, Eshell would get confused and think the following command was unterminated due to the second double-quote looking like it was escaped: echo "\\" * lisp/eshell/esh-util.el (eshell-find-delimiter): Correct docstring and treat '\' as an escapeable character when using backslash escapes. * test/lisp/eshell/eshell-tests.el (eshell-test/escape-special-quoted): Adapt test.
* ; Pacify obsoletion warnings in image-tests.el.Basil L. Contovounesios2022-04-021-3/+4
|
* em-extpipe: Catch eshell-incomplete thrown while parsingSean Whitton2022-04-021-0/+4
| | | | | | | | | | | | * lisp/eshell/em-extpipe.el (em-extpipe--or-with-catch): New macro. (eshell-parse-external-pipeline): Use new macro to treat `eshell-incomplete' as a failure of the parse function to move us forward (Bug#54603). Thanks to Jim Porter <jporterbugs@gmail.com> for the report and for help isolating the problem. * test/lisp/eshell/eshell-tests.el (eshell-test/lisp-command-with-quote): New test for Bug#54603, thanks to Jim Porter <jporterbugs@gmail.com> (bug#54603).
* kmacro: Represent it as an OClosureStefan Monnier2022-04-011-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the old lambda+list into a single OClosure object which plays both roles at the same time. Take advantage of it to provide a `cl-print-object` method so kmacro objects print nicely using the `key-parse` syntax. Also replace the old `kmacro-lambda-form` with a new `kmacro` constructor which takes a `key-parse` syntax, so that the code inserted with `insert-kbd-macro` is now more readable. * lisp/kmacro.el (kmacro): New OClosure type. (kmacro-ring-head): Use `kmacro` constructor. (kmacro-push-ring): Convert `elt` from old representation if needed. (kmacro-split-ring-element, kmacro-view-ring-2nd, kmacro-view-macro): Adapt to new representation. (kmacro-exec-ring-item): Turn into obsolete alias. (kmacro-call-ring-2nd, kmacro-end-or-call-macro): Adjust accordingly. (kmacro-start-macro): Simplify call to `kmacro-push-ring`. (kmacro): New constructor function. Replaces `kmacro-lambda-form`. (kmacro-lambda-form): Use it and declare obsolete. (kmacro-extract-lambda): Rewrite and declare obsolete. (kmacro-p): Rewrite. (cl-print-object): New method. (kmacro-bind-to-key, kmacro-name-last-macro): Simplify. * lisp/macros.el (macro--string-to-vector): New function. (insert-kbd-macro): Use it. Generate code using the `kmacro` constructor. * test/lisp/kmacro-tests.el (kmacro-tests-kmacro-bind-to-single-key): Silence warning. (kmacro-tests-name-last-macro-bind-and-rebind): Strengthen the test a bit. (kmacro-tests--cl-print): New test.
* OClosure: Add support for defmethod dispatchStefan Monnier2022-04-011-0/+13
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/oclosure.el (oclosure--class): Add slot `allparents`. (oclosure--class-make): Add corresponding arg `allparents`. (oclosure, oclosure--build-class): Pass the new arg to the constructor. (oclosure--define): Make the predicate function understand subtyping. * lisp/emacs-lisp/cl-preloaded.el (cl--class-allparents): Move from `cl-generic.el`. * lisp/emacs-lisp/cl-generic.el (cl--generic-class-parents): Move to `cl-preloaded.el` and rename to `cl--class-allparents`. Adjust all callers. (cl--generic-oclosure-tag, cl-generic--oclosure-specializers): New functions. (cl-generic-generalizers) <oclosure-struct>: New generalizer. * test/lisp/emacs-lisp/oclosure-tests.el (oclosure-test-gen): New generic function. (oclosure-test): Add test for dispatch on oclosure types.
* Extend signal-process and proced.elMichael Albinus2022-03-301-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/processes.texi (Signals to Processes): Document changes in signal-process. * etc/NEWS: Mention changes in proced.el and signal-process. * lisp/proced.el (proced-signal-function): Declare it obsolete. (proced-remote-directory): New user option. (proced-mode): Adapt docstring. (proced-send-signal, proced-renice): Handle interactive prefix argument. * lisp/net/tramp.el (tramp-signal-process): New defun. Add it to `signal-process-functions'. * src/process.c (Finternal_default_signal_process): New defun, providing the hitherto existing implementation of Fsignal_process. (Fsignal_process): Loop through Vsignal_process_functions. (Vsignal_process_functions): New defvar. (Qinternal_default_signal_process, Qsignal_process_functions): Declare symbols. (Sinternal_default_signal_process): Declare subroutine. * test/lisp/net/tramp-tests.el (tramp-test31-signal-process): New test.
* Handle process property `remote-command' in TrampMichael Albinus2022-03-291-39/+70
| | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Remote processes): New subsection "Process properties of asynchronous remote processes". * lisp/net/tramp.el (tramp-handle-make-process): * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process) Set `remote-command' process property. (tramp-scp-direct-remote-copying): Rename connection property. * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test31-interrupt-process) (tramp--test-async-shell-command): Check process property `remote-command'.
* ipv6 addresses aren't suspiciousLars Ingebrigtsen2022-03-291-1/+10
| | | | | | | * lisp/international/textsec.el (textsec--ipvx-address-p): New function. (textsec-domain-suspicious-p): Use it to say that ipv6 addresses aren't suspicious (bug#54624).
* Add tests for Eshell's umask commandJim Porter2022-03-291-0/+71
| | | | | | | 'em-basic-test/umask-set' fails when passing an actual number to the command, but this is fixed in the subsequent commit. test/lisp/eshell/em-basic-tests.el: New file.
* Add OClosures, a cross between functions and structsStefan Monnier2022-03-281-0/+113
| | | | | | | | | | | | | | | | | | We here just add the new type. It is not fully self-contained. It requires cooperation from `cconv.el` on the one hand, and it hijacks the docstring info to hold the type of OClosure objects. This does imply that OClosures can't have docstrings, tho this limitation will be lifted in subsequent patches. * lisp/emacs-lisp/oclosure.el: New file. * test/lisp/emacs-lisp/oclosure-tests.el: New file. * doc/lispref/functions.texi (OClosures): New section. * src/eval.c (Ffunction): Accept symbols instead of strings for docstrings. * src/doc.c (store_function_docstring): Avoid overwriting an OClosure type. * lisp/emacs-lisp/cconv.el (cconv--convert-function): Tweak ordering of captured variables. (cconv-convert): Add case for `oclosure--fix-type`.
* ; Fix filename in undigest-tests.el headerMauro Aranda2022-03-241-1/+1
|
* Load desktop without prompting if process is deadStefan Kangas2022-03-241-0/+50
| | | | | | | | | | | | | | | | * doc/emacs/misc.texi (Saving Emacs Sessions): Document the new 'check' value. * etc/NEWS: Announce the change (bug#1474). * lisp/desktop.el (desktop-load-locked-desktop): Add new value 'check' to load desktop file without prompting if locking Emacs process does not exist on the local machine. (Bug#1474) (desktop-read): Extract function from here... (desktop--load-locked-desktop-p): ...to here. New function handles the semantics of 'desktop-load-locked-desktop', including above new value 'check'. (desktop--emacs-pid-running-p): New function. * test/lisp/desktop-tests.el: New file with tests for the above.
* Make undigest work with multipart/mixed messagesMauro Aranda2022-03-231-0/+354
| | | | | | | | | | * test/lisp/mail/undigest.el: New test file (bug#12873). * lisp/mail/undigest.el (rmail-digest-methods): Install rmail-digest-parse-mixed-mime. (rmail-content-type-boundary): New function, to get a specific Content-type boundary. (rmail-digest-parse-mixed-mime): New function, to search for a multipart/digest message inside a multipart/mixed message.
* Fix hl-line testsPo Lu2022-03-231-3/+6
| | | | | | | * lisp/hl-line.el (hl-line-mode): Restore old setter. * test/lisp/hl-line-tests.el (hl-line-tests-verify): Don't rely `cl-some' always returning t on success. (hl-line-tests-sticky-across-frames): Use correct global variable.
* Restore hl-line--buffer trackingdickmao2022-03-221-24/+84
| | | | | | | | | | | | | * lisp/hl-line.el (hl-line-overlay, hl-line-overlay-buffer): Correct replacement variable. (hl-line--overlay): Clearer doc. (hl-line--buffer): Nee hl-line-overlay-buffer (hl-line-sticky-flag): Custom initialization is unfathomable. (hl-line-mode, hl-line-unhighlight): Orthogonalize sticky. (hl-line-highlight): Remove highlight from previous buffer. * test/lisp/hl-line-tests.el (hl-line-sticky, hl-line-tests-verify): (hl-line-tests-sticky-across-frames, hl-line-tests-sticky): Test (bug#54481).
* Fix color-lighten-hsl logicLars Ingebrigtsen2022-03-221-7/+7
| | | | | | * lisp/color.el (color-lighten-hsl): Lighten by percentage, instead of just adding the specified number to the luminance element (bug#54514).
* Revert todo-mode tests failing after todo-mode reversionLars Ingebrigtsen2022-03-221-5/+5
|
* Rewrite hl-line-modedickmao2022-03-212-5/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fashion of dual global and minor modes, each managing a replica of state, has long been outmoded by globalized minor modes (nee easy-mmode-define-global-mode) around the turn of the century. * lisp/calendar/todo-mode.el (todo-toggle-item-highlighting, todo-hl-line-range, todo-modes-set-2): Adapt to new hl-line-highlight-hook. * lisp/hl-line.el (hl-line-overlay): Rename hl-line--overlay. (global-hl-line-overlay, global-hl-line-overlays, global-hl-line-sticky-flag, hl-line-overlay-buffer, hl-line-range-function): Obsolesce. (hl-line--overlay): Erstwhile hl-line-overlay. (hl-line, hl-line-face): Consolidate. (hl-line-sticky-flag): Say less (Gen Z Hospital). (hl-line-overlay-priority): Make this a custom. (hl-line-highlight-hook): Prefer hook over specialized hl-line-range-function. (hl-line-mode): Say less (Gen Z Hospital). (hl-line-make-overlay): Remove (hl-line-highlight, hl-line-unhighlight): Rewrite. (hl-line-maybe-unhighlight): Remove. (hl-line-turn-on): Necessary for globalized minor mode. (global-hl-line-mode, global-hl-line-highlight, global-hl-line-highlight-all, global-hl-line-unhighlight, global-hl-line-maybe-unhighlight, global-hl-line-unhighlight-all): Prefer globalized minor mode. (hl-line-move, hl-line-unload-function): Remove. * test/lisp/calendar/todo-mode-tests.el (todo-test-item-highlighting, todo-test-done-items-separator06-bol, todo-test-done-items-separator06-eol, todo-test-done-items-separator07): Adapt to consolidated face.
* Support indentation of Ruby pattern matching expressionsDmitry Gutov2022-03-211-0/+8
| | | | | | | | * lisp/progmodes/ruby-mode.el (ruby-smie-grammar, ruby-smie-rules) (ruby-block-mid-keywords): Treat 'in' token similarly to 'when'. * test/lisp/progmodes/ruby-mode-resources/ruby.rb: Add indentation example.
* ; * test/lisp/erc/erc-tests.el (erc--switch-to-buffer): Fix test failure.F. Jason Park2022-03-191-1/+3
|
* Add unit test for erc--switch-to-bufferF. Jason Park2022-03-191-1/+56
| | | | | * test/lisp/erc/erc-tests.el (erc--switch-to-buffer): Add new test. (Bug#53617)
* Make application configurable in 'with-connection-local-variables'Michael Albinus2022-03-181-0/+18
| | | | | | | | | | | | | * doc/lispref/variables.texi (Connection Local Variables): Explain 'connection-local-default-application'. * etc/NEWS: Mention 'connection-local-default-application'. * lisp/files-x.el (connection-local-default-application): New variable. (connection-local-criteria-for-default-directory): Use it. (Bug#54405) * test/lisp/files-x-tests.el (files-x-test-with-connection-local-variables): Extend test.
* Restore HOME after mailcap-parsing-and-mailcap-mime-infoLars Ingebrigtsen2022-03-171-39/+39
| | | | | | * test/lisp/net/mailcap-tests.el (mailcap-parsing-and-mailcap-mime-info): Restore HOME after the test (bug#54435).
* Enable Tramp reloadingMichael Albinus2022-03-171-2/+7
| | | | | | | | * lisp/net/tramp.el (tramp-file-name): Add ;;;###tramp-autoload cookie. (Bug#50869) * test/lisp/net/tramp-tests.el (tramp-test47-unload): Do not skip. Test reload.
* Make `?' work again in read-multiple-choiceLars Ingebrigtsen2022-03-171-2/+1
| | | | | * lisp/emacs-lisp/rmc.el (read-multiple-choice): Make the `?' key work again to show the help text.
* Format long help texts better in read-multiple-choiceFelician Nemeth2022-03-171-1/+23
| | | | | * lisp/emacs-lisp/rmc.el (rmc--show-help): Format long help texts better (bug#54430).
* Make Edebug specification for 'cl-defstruct' more lenient.Philipp Stephani2022-03-141-0/+18
| | | | | | | | | For example, 'xref-item' uses the list form of ':noinline'. * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Accept ':noinline' and ':named' with an argument. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct/edebug): New unit test.
* Fix esh-proc-tests on macOSMattias Engdegård2022-03-131-1/+1
| | | | | | * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline): Add pattern matching output when killing a process on macOS (and possibly other BSDs).
* Disable esh-proc-test/kill-pipeline on EMBALars Ingebrigtsen2022-03-121-0/+3
| | | | | | | | | | | Test esh-proc-test/kill-pipeline condition: (ert-test-failed ((should (string-match-p (rx ...) (buffer-substring-no-properties output-start ...))) :form (string-match-p "\\(?:\\(?:interrupt\\|killed\\)\n\\)" "")
* Fix EMBA failure for ert-test-record-backtraceLars Ingebrigtsen2022-03-121-2/+5
| | | | | * test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Make this work with AOT.
* Mark tramp-test30-make-process unstable on EMBALars Ingebrigtsen2022-03-121-1/+3
| | | | | * test/lisp/net/tramp-tests.el (tramp-test30-make-process): This times out on EMBA.
* Mark tramp test unstable on EMBALars Ingebrigtsen2022-03-081-1/+3
| | | | | | * test/lisp/net/tramp-tests.el (tramp-test44-asynchronous-requests): Mark timed-out EMBA test as unstable.
* Support applying indices to more Eshell dollar expansionsJim Porter2022-03-081-0/+23
| | | | | | | | | | | | | | For example, '${echo -e "hi\nbye"}[1]' should expand to "bye". * lisp/eshell/esh-var.el (eshell-parse-variable-ref): Support applying indices to '${}', '$()', and '$<>' forms. (Bug#54227) * lisp/eshell/esh-var-tests.el (esh-var-test/interp-lisp-indices) (esh-var-test/interp-cmd-indices) (esh-var-test/interp-cmd-external-indices) (esh-var-test/quoted-interp-lisp-indices) (esh-var-test/quoted-interp-cmd-indices): New tests.
* Mark ert-test-run-tests-batch-expensive unstable on EMBALars Ingebrigtsen2022-03-071-0/+1
|
* Rework `abbreviate-file-name' in TrampMichael Albinus2022-03-071-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add 'tramp-get-home-directory'. * lisp/net/tramp-compat.el (tramp-file-name-handler): Declare. (tramp-compat-exec-path): Use it. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add 'tramp-get-home-directory'. (tramp-gvfs-handle-expand-file-name): Rewrite tilde handling. (tramp-gvfs-handle-get-home-directory): New defun. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add 'tramp-get-home-directory'. (tramp-sh-handle-get-home-directory): New defun. (tramp-sh-handle-expand-file-name): Rewrite tilde handling. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add 'tramp-get-home-directory'. (tramp-smb-handle-expand-file-name): Rewrite tilde handling. (tramp-smb-handle-get-home-directory): New defun. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add 'tramp-get-home-directory'. (tramp-sudoedit-handle-expand-file-name): Rewrite tilde handling. (tramp-sudoedit-handle-get-home-directory): New defun. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `tramp-get-home-directory'. (tramp-get-home-directory): New defun. (tramp-handle-abbreviate-file-name): Use it. (tramp-set-file-uid-gid, tramp-get-remote-uid) (tramp-get-remote-gid): Use `tramp-file-name-handler'. (tramp-get-remote-null-device): Do not check for null VEC, it doesn't happen anymore. * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative): Reorder checks. (tramp-test07-abbreviate-file-name): (tramp--test-ange-ftp-p): Adapt tests.
* Fix esh-proc-test/kill-pipeline-head loop syntaxLars Ingebrigtsen2022-03-071-1/+1
| | | | | * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline-head): Fix syntax of loop.
* Inhibit extpipe tests on EMBA, because they apparently time out?Lars Ingebrigtsen2022-03-071-0/+1
| | | | https://emba.gnu.org/emacs/emacs/-/pipelines/16387
* Fix `W' in Dired with non-ASCII file namesLars Ingebrigtsen2022-03-071-4/+7
| | | | | | | | | * lisp/net/browse-url.el (browse-url--file-name-coding-system): Factor out into own function. (browse-url-file-url): Property encode non-ASCII characters so that external browsers can understand them. (browse-url-emacs): Make `W' in Dired work with non-ASCII file names (bug#54271).