summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Allow the caller to specify own face on suffix in annotation-functionJuri Linkov2021-01-30
| | | | | | | | | | | | | | | | | | * lisp/minibuffer.el (completion--insert-strings): Don't add 'completions-annotations' face when the caller specified own face in annotation-function. Remove no-op code for 'unless prefix' branch. (completion-metadata, completion-extra-properties): Update docs of affixation-function. Suggested by Clemens <clemera@posteo.net> (bug#45780) * test/lisp/minibuffer-tests.el: Rename package name from completion-tests.el to minibuffer-tests.el. Add new test completion--insert-strings-faces. * doc/lispref/minibuf.texi (Completion Variables) (Programmed Completion): Update descriptions of annotation-function and affixation-function.
* * test/lisp/electric-tests.el: Fix switch to lexical-binding.Stefan Monnier2021-01-29
| | | | | (define-electric-pair-test): Don't presume that function values are self-evaluating.
* Use lexical-binding in sasl.el and add testsStefan Kangas2021-01-29
| | | | | | | | | | * lisp/net/sasl.el: * lisp/net/sasl-digest.el: * lisp/net/sasl-cram.el: * lisp/net/sasl-ntlm.el: Use lexical-binding. * test/lisp/net/sasl-tests.el: * test/lisp/net/sasl-cram-tests.el: New files.
* * test/lisp/net/tramp-tests.el (tramp--test-special-characters):Michael Albinus2021-01-29
| | | | Adapt test for docker.
* Use lexical-binding in find-cmd.el and add testsStefan Kangas2021-01-29
| | | | | * lisp/find-cmd.el: Use lexical-binding. * test/lisp/find-cmd-tests.el: New file.
* * test/Makefile.in (emacs): Use the C localeStefan Monnier2021-01-28
| | | | | | | | This fixes spurious test failures in my environment for `diff-mode-test-font-lock-syntax-one-line` (where my `diff` otherwise returns "No newline at end of file" in French) and for various tests in `emacs-module-tests` because errors signal "Abandon" instead of "Abort".
* Use lexical-binding in lisp/{term,nxml,language}Stefan Monnier2021-01-28
| | | | | | | | | | | | | * test/lisp/electric-tests.el: * lisp/term/w32console.el: * lisp/nxml/rng-util.el: * leim/leim-ext.el: Use lexical-binding. * lisp/international/titdic-cnv.el (tit-process-header) (miscdic-convert): * lisp/international/mule-cmds.el (leim-list-header): * lisp/international/ja-dic-cnv.el (skkdic-convert): Use lexical-binding in the generated file.
* Fix fill-paragraph in asm-modeMattias M2021-01-28
| | | | | | | | | | | * lisp/progmodes/asm-mode.el: The value of fill-prefix ought to be nil not "\t" so that fill-context-prefix can do its thing. In fact, fill-prefix does not have to be set at all becuase asm-mode derives from prog-mode and fill-prefix is set in simple.el. * test/lisp/progmodes/asm-mode-tests.el: Add relevant test (bug#41064). Copyright-paperwork-exempt: yes
* Some Tramp fixesMichael Albinus2021-01-27
| | | | | | | | | | | | | | | | * doc/misc/tramp.texi (GVFS-based methods): Ban sftp RemoteCommand option. * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): Avoid calling jka-compr when writing the target file. * lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p): Skip GROUP test on *BSD machines. * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory-one-file): Skip for tamp-crypt.el. (tramp--test-sh-no-ls--dired-p): Ignore errors.
* * lisp/progmodes/sh-script.el (sh-smie-sh-rules): Tweak indent of new `for`Stefan Monnier2021-01-26
| | | | | The new `for (TEST) { BODY }` syntax introduces various challenges. This patch just fixes a trivial subcase.
* Fontify special forms and macros the sameLars Ingebrigtsen2021-01-25
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword): Handle special forms and macros the same way (bug#43265). This makes things like (setq a '(if a b)) be fontified correctly (i.e., not fontified as a keyword).
* Fix macro fontification in `condition-case' handler bodiesLars Ingebrigtsen2021-01-24
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Fontify macros in the BODY of HANDLERS in `condition-case' correctly (bug#43265).
* Tweak `condition-case' keyword highlightsLars Ingebrigtsen2021-01-24
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Tweak `condition-case' position check to skip the VAR form.
* Add some elisp-mode font lock testsLars Ingebrigtsen2021-01-24
|
* Make Tramp's insert-directory more robustMichael Albinus2021-01-24
| | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Use `tramp-sh--quoting-style-options'. * test/lisp/net/tramp-tests.el (tramp--test-hpux-p, tramp--test-ksh-p): Remove superfluous nil. (tramp--test-sh-no-ls--dired-p): New defun. (tramp--test-special-characters): Use it.
* Add more assertions to recently-added process test.Philipp Stephani2021-01-24
| | | | | | * test/src/process-tests.el (process-tests/multiple-threads-waiting): Also check that 'thread-join' and 'thread-last-error' return the expected errors.
* Fix recently uncovered 'make check' failuresBasil L. Contovounesios2021-01-23
| | | | | | | | | | | | | | | | | | For discussion, see the following thread: https://lists.gnu.org/r/emacs-devel/2021-01/msg01111.html * test/lisp/autorevert-tests.el (auto-revert-test07-auto-revert-several-buffers): * test/lisp/emacs-lisp/seq-tests.el (test-seq-do-indexed) (test-seq-random-elt-take-all): Fix errors from using add-to-list on lexical variables. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record): Expect test to succeed when byte-compiled following change of 2021-01-23 'Fix missing file&line info in "Unknown defun property" warnings'. (cl-lib-tests--dummy-function): Remove; no longer needed. (old-struct): Silence byte-compiler warning about unused lexical variable.
* Add a unit test testing interaction between threads and processes.Philipp Stephani2021-01-23
| | | | | | | | This unit test tests that we can call 'accept-process-output' in parallel from multiple threads. * test/src/process-tests.el (process-tests/multiple-threads-waiting): New unit test.
* Fix failed autorevert test on embaMichael Albinus2021-01-23
| | | | | * test/lisp/autorevert-tests.el (auto-revert-test05-global-notify): Check, whether buffer is alive.
* * test/infra/gitlab-ci.yml (.job-template): Check also for test/lib-src/*.el.Michael Albinus2021-01-23
|
* Use RemoteCommand option for Tramp's sshx and scpx methodsMichael Albinus2021-01-22
| | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Inline methods) <sshx>: (External methods) <scpx>: Adapt call sequence. (Remote shell setup): Mention, that sshx and scpx overwrite RemoteCommand. (Remote processes): Restriction: direct asynchronous processes cannot be used when RemoteCommand is in use. `tramp-remote-process-environment' is not ignored any longer. * lisp/net/tramp-sh.el (tramp-methods) <sshx, scpx>: Handle login shell via RemoteCommand. Remove `tramp-direct-async' parameter. (tramp-maybe-open-connection): Add "-i" to login. * lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_NOT_SUPPORTED". (tramp-smb-handle-insert-directory): Fix point moving error. * test/lisp/net/tramp-tests.el (tramp-test34-explicit-shell-file-name): Use `get-buffer-process' where appropriate.
* * test/infra/gitlab-ci.yml: Copy newer files to image to build less often.Ted Zlatanov2021-01-21
|
* Fix spurious "Lexical argument shadows the dynamic variable" due to inliningStefan Monnier2021-01-21
| | | | | | | | | | | | | | | | | | | Before this patch doing: rm lisp/calendar/calendar.elc make lisp/calendar/cal-hebrew.elc would spew out lots of spurious such warnings about a `date` argument, pointing to code which has no `date` argument in sight. This was because that code had calls to inlinable functions (taking a `date` argument) defined in `calendar.el`, and while `date` is a normal lexical var at the site of those functions' definitions, it was declared as dynbound at the call site. * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Don't impose our local context onto the inlined function. * test/lisp/emacs-lisp/bytecomp-tests.el: Add matching test.
* * test/infra/gitlab-ci.yml: Revert to always building.Ted Zlatanov2021-01-21
|
* Tweak tty-find-type to allow TERM=screen.xtermLars Ingebrigtsen2021-01-20
| | | | | * lisp/faces.el (tty-find-type): Allow TERM=screen.xterm to find term/screen.el (bug#45824).
* Make symbol-at-point return nil if there's no symbols in the bufferLars Ingebrigtsen2021-01-20
| | | | | | | * lisp/thingatpt.el (thing-at-point--beginning-of-symbol): Special op that errors out when there's no symbols in the buffer before point (bug#14234). (symbol): Use it.
* Add tests for symbol-at-point (bug#14234)Lars Ingebrigtsen2021-01-20
|
* Revert "Make `symbol-at-point' work in buffers with no symbols"Lars Ingebrigtsen2021-01-20
| | | | | | | This reverts commit 40a5df81434ce02fba01779256b50976fb74da4f. This fails when a point is after a symbol, and there's nothing else in the buffer.
* Make `symbol-at-point' work in buffers with no symbolsLars Ingebrigtsen2021-01-20
| | | | | | | | * lisp/thingatpt.el (thing-at-point--end-of-symbol): New function (bug#14234). (symbol): Use it instead of `forward-symbol', because the latter will move to the end of the buffer even if there is no symbol there. Instead error out like `forward-sexp' and friends.
* test/lisp/replace-tests.el: Add nested match group testNick Drozd2021-01-20
| | | | | * test/lisp/replace-tests.el (replace-regexp-bug45973): Add test (bug#45973).
* * test/infra/gitlab-ci.yml: Bootstrap only from web, schedule, or C-related.Ted Zlatanov2021-01-19
|
* Some Tramp fixes, resulting from test campaignMichael Albinus2021-01-19
| | | | | | | | | | | | | * doc/misc/tramp.texi (Remote shell setup): Clarifications for `tramp-actions-before-shell' example. * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Do not expand FILENAME explicitely. (tramp-open-shell): Add "-i" for interactive shells. * test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p) (tramp-test14-delete-directory) (tramp-test43-asynchronous-requests): Skip for MS windows.
* Handle also test/lib-src directoryMichael Albinus2021-01-19
| | | | | | | | * test/Makefile.in (SUBDIRS): Add lib-src. * test/README: Add predefined selectors. * test/file-organization.org: Mention test/lib-src directory.
* Add test for the widget-color-match function (Bug#45829)Mauro Aranda2021-01-19
| | | | * test/lisp/wid-edit-tests.el (widget-test-color-match): New test.
* time-stamp-tests now pass in more localesStephen Gildea2021-01-18
| | | | | | | | Update time-stamp-tests to use format-time-string to generate the date words (month, day of week, AM/PM) instead of hard-coding English. Now the tests pass in locales other than "C" and US English. Expand the test coverage of modifier characters.
* * test/src/xdisp-tests.el: Fix tests to work in batch modeAaron Jensen2021-01-18
| | | | | | | (xdisp-tests--window-text-pixel-size) (xdisp-tests--window-text-pixel-size-leading-space) (xdisp-tests--window-text-pixel-size-trailing-space): Fix tests. (Bug#45748)
* Replace Unix commands with Emacs in process tests.Philipp Stephani2021-01-18
| | | | | | | | | | | | That way, the tests only depend on Emacs, and not on utilities that might not be available during test time. * test/src/process-tests.el (process-tests--eval) (process-tests--emacs-command, process-tests--emacs-binary) (process-tests--dump-file) (process-tests--usable-file-for-reinvoke): New helper functions. (process-tests/sentinel-called) (process-tests/sentinel-with-multiple-processes): Use them.
* ; * test/infra/gitlab-ci.yml: Merge test-template script into job-template.Ted Zlatanov2021-01-17
|
* * test/infra/gitlab-ci.yml: Merge test-template into job-template.Ted Zlatanov2021-01-17
|
* Ensure that sentinels are called during 'accept-process-output'.Philipp Stephani2021-01-17
| | | | | | | | | | | | When we're trying to notify a process about a status change, we need to ignore the SIGCHLD pipe temporarily, otherwise the code would likely not run into the timeout case that's necessary for a status change to happen. * src/process.c (wait_reading_process_output): Ignore the SIGCHLD pipe when notifying a process about a status change. * test/src/process-tests.el (process-tests/sentinel-called) (process-tests/sentinel-with-multiple-processes): New unit tests.
* Add new targets to test/MakefileMichael Albinus2021-01-17
| | | | | | | | | | * test/Makefile.in (SUBDIRS): New variable. (subdir_template): New template. (top) Create new check-<dirname> targets. * test/README: Document them. * test/infra/gitlab-ci.yml (test-lisp-net-inotify): Rename.
* * lisp/emacs-lisp/pcase.el: Add support for `not` to `pred`Stefan Monnier2021-01-16
| | | | | | | | | | | | | (pcase--split-pred, pcase--funcall): Adjust for `not`. (pcase--get-macroexpander): New function. (pcase--edebug-match-macro, pcase--make-docstring) (pcase--macroexpand): Use it. * lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Use it! * doc/lispref/control.texi (The @code{pcase} macro): Document it. * lisp/emacs-lisp/ert.el (ert--explain-equal-rec): Remove redundant test.
* Fix deadlock when receiving SIGCHLD during 'pselect'.Philipp Stephani2021-01-16
| | | | | | | | | | | | | | | | | | | | | | If we receive and handle a SIGCHLD signal for a process while waiting for that process, 'pselect' might never return. Instead, we have to explicitly 'pselect' that the process status has changed. We do this by writing to a pipe in the SIGCHLD handler and having 'wait_reading_process_output' select on it. * src/process.c (child_signal_init): New helper function to create a pipe for SIGCHLD notifications. (child_signal_read, child_signal_notify): New helper functions to read from/write to the child signal pipe. (create_process): Initialize the child signal pipe on first use. (handle_child_signal): Notify waiters that a process status has changed. (wait_reading_process_output): Make sure that we also catch SIGCHLD/process status changes. * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-process): Remove workaround, which is no longer needed.
* Fix two testsEli Zaretskii2021-01-16
| | | | | | | | | | * test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-test-run): Make sure file names can be compared as strings, by running them through 'file-truename'. Reported by Vin Shelton <acs@alumni.princeton.edu>. * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-obsolete-hook.el") ("warn-obsolete-variable.el"): Use [^z-a] to match a newline as well. Reported by Vin Shelton <acs@alumni.princeton.edu>.
* test/infra/gitlab-ci.yml: run only for tags and some branchesTed Zlatanov2021-01-16
|
* EMBA container build improvements for Emacs build testing.Ted Zlatanov2021-01-16
| | | | | | | | | | | * test/infra/gitlab-ci.yml: Moved from .gitlab-ci.yml. Use the EMBA container registry with a different login token storage file for each commit. Split test stages into prep, build, fast tests, normal tests, platform tests, and slow (everything) and use templates where possible. * .gitlab-ci.yml: Include test/infra/gitlab-ci.yml and move all content there.
* Fix 'window-text-pixel-size' when there are leading/trailing spacesAaron Jensen2021-01-15
| | | | | | | | | | | | | | | First, scan to find the first non-whitespace character and then backtrack to find the beginning of the line. The previous algorithm always started on the non-whitespace character during the backtrack, causing it to stop immediately and not actually find the beginning of the line. The same applies to the end of line calculation. * src/xdisp.c: (Fwindow_text_pixel_size): Fix off by one error. (Bug#45748) * test/src/xdisp-tests.el (xdisp-tests--window-text-pixel-size) (xdisp-tests--window-text-pixel-size-leading-space) (xdisp-tests--window-text-pixel-size-trailing-space): New tests.
* Some Tramp adaptions, mainly direct async processesMichael Albinus2021-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Firewalls, Remote processes) (Frequently Asked Questions): Add @vindex. (Predefined connection information): Precise precondition or direct async processes. (Remote shell setup): Ban ssh RemoteCommand option. (Frequently Asked Questions): Adapt quoting. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.1-pre". * lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-direct-async' parameter. (tramp-adb-handle-make-process): Adapt docstring. * lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync, ssh, sshx>: Add `tramp-direct-async' parameter. (tramp-sh-handle-insert-directory): Simplify merkers. (tramp-sh-handle-make-process): Adapt docstring. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-debug-message): Suppress lockfiles. (tramp-test-message): New defun. (tramp-direct-async-process-p): Check also for `tramp-direct-async'. (tramp-handle-make-process): Do not check for `tramp-direct-async-args'. * test/lisp/net/tramp-tests.el (all): Replace `string-match' by `string-match-p'. (dired-copy-dereference): Declare. (tramp-test-temporary-file-directory): Remove `tramp-direct-async-args` for mock method. (tramp-test15-copy-directory, tramp-test40-special-characters) (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls, tramp-test41-utf8) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Skip for tramp-rclone.el. (tramp--test--deftest-direct-async-process): Do not skip for mock method. (tramp-test32-shell-command): Adapt test for direct async processes. (tramp-test36-vc-registered, tramp--test-hpux-p, tramp--test-ksh-p): Use `tramp-test-vec'.
* EMBA infrastructure improvements for Emacs build testing.Ted Zlatanov2021-01-14
| | | | | | | | | | | | * .gitlab-ci.yml: Use job templates and rules. Split tests into fast/normal/slow. Make Docker images for each tested platform (inotify, filenotify-gio, gnustep). Increase timeout. * test/Makefile.in (check-lisp, check-net): Add new testing targets. * test/README: Document them. * test/file-organization.org: Mention test/infra. * test/infra/Dockerfile.emba: Add special Docker recipes for EMBA testing.
* Lift {global,local}-key-binding to LispStefan Kangas2021-01-13
| | | | | | | | * lisp/subr.el (local-key-binding, global-key-binding): New defuns. * src/keymap.c (Flocal_key_binding, Fglobal_key_binding): Remove DEFUNs. (syms_of_keymap): Remove defsubrs for above DEFUNs. * test/lisp/subr-tests.el (subr-test-local-key-binding) (subr-test-global-key-binding): New tests.