summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix failed autorevert test on embaMichael Albinus2021-01-231-2/+4
| | | | | * 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-231-0/+1
|
* Use RemoteCommand option for Tramp's sshx and scpx methodsMichael Albinus2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | * 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-211-4/+5
|
* Fix spurious "Lexical argument shadows the dynamic variable" due to inliningStefan Monnier2021-01-213-0/+27
| | | | | | | | | | | | | | | | | | | 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-211-3/+3
|
* Tweak tty-find-type to allow TERM=screen.xtermLars Ingebrigtsen2021-01-201-0/+8
| | | | | * 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-201-1/+0
| | | | | | | * 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-201-0/+45
|
* Revert "Make `symbol-at-point' work in buffers with no symbols"Lars Ingebrigtsen2021-01-201-14/+0
| | | | | | | 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-201-0/+14
| | | | | | | | * 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-201-0/+13
| | | | | * 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-191-4/+33
|
* Some Tramp fixes, resulting from test campaignMichael Albinus2021-01-191-11/+11
| | | | | | | | | | | | | * 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-193-9/+13
| | | | | | | | * 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-191-0/+11
| | | | * test/lisp/wid-edit-tests.el (widget-test-color-match): New test.
* time-stamp-tests now pass in more localesStephen Gildea2021-01-181-52/+75
| | | | | | | | 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-181-18/+15
| | | | | | | (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-181-9/+71
| | | | | | | | | | | | 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-171-6/+5
|
* * test/infra/gitlab-ci.yml: Merge test-template into job-template.Ted Zlatanov2021-01-171-32/+30
|
* Ensure that sentinels are called during 'accept-process-output'.Philipp Stephani2021-01-171-0/+53
| | | | | | | | | | | | 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-173-14/+19
| | | | | | | | | | * 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-161-0/+4
| | | | | | | | | | | | | (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-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | 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-162-3/+15
| | | | | | | | | | * 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-161-0/+9
|
* EMBA container build improvements for Emacs build testing.Ted Zlatanov2021-01-162-1/+209
| | | | | | | | | | | * 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-151-0/+30
| | | | | | | | | | | | | | | 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-151-63/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-144-0/+88
| | | | | | | | | | | | * .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-131-0/+11
| | | | | | | | * 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.
* Prefer skip-unless in more testsStefan Kangas2021-01-133-19/+19
| | | | | | * test/lisp/emacs-lisp/timer-tests.el (timer-tests-debug-timer-check): * test/src/decompress-tests.el (zlib--decompress): * test/src/xml-tests.el (libxml-tests): Prefer skip-unless.
* Use skip-unless instead of if+message in testStefan Kangas2021-01-131-4/+2
| | | | | * test/lisp/cedet/semantic-utest.el (semantic-utest-Javascript): Use skip-unless instead of if+message.
* Remove some XEmacs compat code from testsStefan Kangas2021-01-132-6/+1
| | | | | | | * test/lisp/cedet/srecode-utest-getset.el (srecode-utest-getset-output): * test/lisp/cedet/srecode-utest-template.el (srecode-utest-template-output): Remove XEmacs compat code.
* Stabilise lunar-phase-list test (bug#45818)Mattias EngdegÄrd2021-01-131-20/+18
| | | | | | | | | | | | | The test reference data was produced with accidental interference from the system daylight saving in effect at the time. Prevent that from occurring again and correct the data. * test/lisp/calendar/lunar-tests.el (with-lunar-test): Switch to UTC and make sure daylight saving adjustment is disabled. Use normal time presentation for maintainability. * test/lisp/calendar/lunar-tests.el (lunar-test-phase): Adjust to UTC. (lunar-test-phase-list): Adjust to UTC with correct times. Enable the test by removing its :unstable mark.
* Fix Indian time zone test when run by Irishmen (bug#45818)Mattias EngdegÄrd2021-01-121-1/+3
| | | | | | | | | * test/lisp/calendar/solar-tests.el (solar-sunrise-sunset): Inhibit any attempt by confused calendar code to apply daylight saving correction when Irish time zone settings are in effect. It's not entirely clear why this is needed but may be related to the fact that 'IST' stands for both Irish and Indian Standard Time, and that Ireland uses reversed daylight saving in winter.
* Only run IPv6 tests if we have an IPv6 addressRobert Pluim2021-01-122-8/+21
| | | | | | | | | | | | | | * test/src/process-tests.el (ipv6-is-available): New function for checking whether we have a globally routable IPv6 prefix assigned. (lookup-family-specification): Use 'ipv6-is-available' to check for IPv6. Use 'localhost' instead of 'google.com' to test 'network-lookup-address-info' API. (lookup-google): Use 'ipv6-is-available' to check for IPv6. * test/lisp/net/nsm-tests.el (nsm-ipv6-is-available): Rename to 'ipv6-is-available', make identical to the one in test/src/process-tests.el.
* Add a new function 'buffer-line-statistics'Lars Ingebrigtsen2021-01-121-0/+58
| | | | * src/fns.c (Fbuffer_line_statistics): New function.
* Add a new variable `inhibit-interaction'Lars Ingebrigtsen2021-01-122-0/+21
| | | | | | | | | | | | | | | | | | | * doc/lispref/elisp.texi (Top): Add a link. * doc/lispref/errors.texi (Standard Errors): Mention the new error. * doc/lispref/minibuf.texi (Minibuffers): Add a link. (Inhibiting Interaction): New node. * src/data.c (syms_of_data): Define the `inhibited-interaction' error. * src/lisp.h: Export the barfing function. * src/lread.c (Fread_char, Fread_event, Fread_char_exclusive): Barf if inhibited. * src/minibuf.c (barf_if_interaction_inhibited): New function. (Fread_from_minibuffer, Fread_no_blanks_input): Barf if inhibited. (syms_of_minibuf): Define the `inhibit-interaction' variable.
* Update substitute-command-keys tests, againGlenn Morris2021-01-121-2/+2
| | | | | | * test/lisp/help-tests.el (help-tests-substitute-command-keys/keymaps) (help-tests-substitute-command-keys/keymap-change): Update following recent minibuffer changes.
* Add a failing test for bug#44834Anticrisis2021-01-111-2/+12
| | | | | | | | | | * test/lisp/progmodes/tcl-tests.el (tcl-mode-namespace-indent-2): New, failing test (bug#44834). (tcl-mode-function-name-2): (tcl-mode-function-name-3): Fix names of the tests so that they're actually run. Copyright-paperwork-exempt: yes
* Improve fill-region-as-paragraph when there's a fill prefixLars Ingebrigtsen2021-01-101-0/+31
| | | | | | * lisp/textmodes/fill.el (fill-region-as-paragraph): Try to improve how line breaks are set on unbreakable text with a fill prefix area that has spaces within (bug#45720).
* Hyperlink symbol names without word syntax in HelpBasil L. Contovounesios2021-01-101-8/+13
| | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2) (lisp-cl-font-lock-keywords-2): Allow single-character symbol names. * lisp/help-mode.el (help-xref-symbol-regexp): Also match symbol names starting with symbol syntax (bug#6601, bug#24309). * test/lisp/help-mode-tests.el (help-mode-tests-xref-button): Test hyperlink creation for function names without symbol syntax.
* Revert recent mm-with-part changeLars Ingebrigtsen2021-01-101-16/+0
| | | | | | * lisp/gnus/mm-decode.el (mm-with-part): Revert 23a887e426f81033b0de2f4c93a8525cb31c28da -- this is the wrong place to handle this peculiarity.
* Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsMichael Albinus2021-01-102-0/+73
|\
| * Add more mm-decode testsLars Ingebrigtsen2021-01-102-0/+73
| |
* | Rework parts of Tramp's insert-directory, bug#45691Michael Albinus2021-01-101-3/+54
|/ | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Fix some unibyte/multibyte inconsistencies. (Bug#45691) * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory-one-file): New test.
* Create new test file for socks.elF. Jason Park2021-01-101-0/+103
| | | | | * test/lisp/net/socks-tests.el (socks-tests-auth-filter-url-http): Add SOCKS5 authentication test and fake server (bug#45162).
* Increase probability that a process test succeeds.Philipp Stephani2021-01-101-0/+5
| | | | | | * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-process): Work around potential Emacs bug.