summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix todo-mode AOT test failures (bug#51308)Lars Ingebrigtsen2021-10-211-1/+1
|
* Fix hi-lock AOT test failures (bug#51308)Lars Ingebrigtsen2021-10-211-5/+10
|
* Fix socks testLars Ingebrigtsen2021-10-211-1/+1
| | | | | * test/lisp/net/socks-tests.el (socks-tests-v4-basic): Fix failure under native-comp (bug#51308).
* ; Fix typoStefan Kangas2021-10-201-1/+1
|
* Adapt Tramp testsMichael Albinus2021-10-202-33/+36
| | | | | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load): Adapt code snippet. * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process): Adapt tests. (tramp--test-supports-set-file-modes-p): Renamed from `tramp--test-supports-file-modes-p'. Adapt all callees. (tramp-test35-exec-path): Use it.
* Code cleanup in tramp-tests.elMichael Albinus2021-10-191-42/+50
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process): Extend tests. (tramp--test-out-of-band-p): New defun. (tramp--test-windows-nt-and-out-of-band-p) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls): Use it. (tramp--test-windows-nt-or-smb-p): Use `tramp--test-windows-nt-p'.
* Fix some Tramp problemsMichael Albinus2021-10-181-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Use `tramp-adb-handle-file-executable-p' and `tramp-adb-handle-file-readable-p'. (tramp-adb-handle-file-executable-p) (tramp-adb-handle-file-readable-p): New defuns. (tramp-adb-handle-file-writable-p): Simplify. (tramp-adb-handle-make-process): Handle :filter being t. (tramp-adb-find-test-command): Remove. * lisp/net/tramp-sh.el (tramp-sh-handle-file-readable-p): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-readable-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use `tramp-handle-file-readable-p'. (tramp-gvfs-handle-file-executable-p): Do not check whether file exists, this is done in `tramp-check-cached-permissions'. (tramp-gvfs-handle-file-readable-p): Remove. * lisp/net/tramp.el (tramp-error): Move binding of `inhibit-message' ... (tramp-signal-hook-function): ... here. (tramp-handle-access-file): Rewrite. (tramp-handle-file-readable-p): New defun. (tramp-handle-make-process): Setting :filter to t works since Emacs 29.1 only. * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory) (tramp-test18-file-attributes): Extend tests.
* Fix xref elisp identifier namespace mistakeMattias Engdegård2021-10-181-0/+11
| | | | | | | | | | | | Pressing `M-.` on ALPHA in (let ((ALPHA BETA)) ...) would incorrectly search for ALPHA as a function rather than a variable. * lisp/progmodes/elisp-mode.el (elisp--xref-infer-namespace): Fix logic. * test/lisp/progmodes/elisp-mode-tests.el (elisp-mode-infer-namespace): Add test case.
* Fix a semantic test on some macOS machinesStefan Kangas2021-10-171-1/+6
| | | | | | * test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test-output-parser-this-machine): Fix test on some macOS machines where running "gcc" runs "llvm" instead.
* Precise documentation of file-notify-add-watchMichael Albinus2021-10-151-1/+1
| | | | | | | * doc/lispref/os.texi (File Notifications): * lisp/filenotify.el (file-notify-add-watch): Precise, that watching a directory includes reports on file changes for some backends. (Bug#51146)
* Accept process-filter t in TrampMichael Albinus2021-10-141-0/+40
| | | | | | | | | * lisp/net/tramp.el (tramp-handle-make-process): * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Filter can be t. * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process): Test filter equal t.
* Fix test bug when calloc returns nullPaul Eggert2021-10-121-1/+4
| | | | | * test/src/emacs-module-resources/mod-test.c (Fmod_test_userptr_make): Don’t dump core if calloc returns null and signal_errno returns.
* Don't apply shorthands to punctuation-only symbols (bug#51089)João Távora2021-10-111-3/+2
| | | | | | | | | | | | | | | This includes symbols used for arithmetic functions such as -, /=, etc. Using "-" or "/=" is still possible but doing so won't shadow those functions. * doc/lispref/symbols.texi (Shorthand, Exceptions): New subsubsection. * src/lread.c (read1): Exempt punctionation-only symbols from oblookup_considering_shorthand. * test/lisp/progmodes/elisp-mode-tests.el (elisp-dont-shadow-punctuation-only-symbols): Tweak test.
* New function num-processorsPaul Eggert2021-10-101-0/+6
| | | | | | | | | | | | | | | | | | | This addresses a FIXME comment in lisp/emacs-lisp/comp.el, relating to the number of subsidiary processes used by comp-run-async-workers in native compilation. * admin/merge-gnulib (GNULIB_MODULES): Add nproc. * doc/lispref/processes.texi (Process Information), etc/NEWS: Document num-processors. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/nproc.c, lib/nproc.h, m4/nproc.m4: New files, copied from Gnulib by admin/merge-gnulib. * lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl. (comp-effective-async-max-jobs): Use num-processors. * src/process.c: Include nproc.h. (Fnum_processors): New function. (syms_of_process): Define ‘all’, ‘current’, ‘num-processors’. * src/w32proc.c (Fw32_get_nproc): Add FIXME comment. * test/src/process-tests.el (process-num-processors): New test.
* Add new failing test for bug#51089João Távora2021-10-101-0/+12
| | | | | * test/lisp/progmodes/elisp-mode-tests.el (elisp-dont-shadow-punctuation-only-symbols): Add new failing test.
* Expanded testing of MH-E with multiple MH variantsStephen Gildea2021-10-092-19/+179
| | | | | | | | | * test/lisp/mh-e/mh-utils-tests.el: Environment variable TEST_MH_PATH controls which installed MH variant to test with. Moved the commentary about testing with different MH variants from above 'with-mh-test-env' definition to "Commentary" section at the top of the file. * test/lisp/mh-e/test-all-mh-variants.sh: New script to test all installed MH variants.
* Refactor mh-utils-tests macro 'with-mh-test-env'Stephen Gildea2021-10-051-17/+19
| | | | | | | * test/lisp/mh-e/mh-utils-tests.el (with-mh-test-env): Refactor to reduce the size of the expanded macro. (mh-test-utils-setup): New helper function. (mh-ensure-native-trampolines): Absorbed by mh-test-utils-setup.
* native-comp-available-p is the definitive testStephen Gildea2021-10-051-1/+1
| | | | | | | | | | * doc/lispref/compile.texi (Native Compilation): Document native-comp-available-p as the way to test for native compilation. * lisp/emacs-lisp/package.el (package--native-compile-async): * test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines): Test for native compilation with native-comp-available-p. Thank you to Andrea Corallo for reviewing this patch.
* * Fix mh tests for native comp builds (bug#50975)Andrea Corallo2021-10-041-0/+11
| | | | | | | * test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines): New function. (mh-test-utils-setup-with-mocks) (mh-test-utils-setup-with-variant): Use it.
* * test/README: Mention :nativecomp tag.Michael Albinus2021-10-041-0/+4
|
* Fix unmounting in TrampMichael Albinus2021-10-031-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (FUSE setup): Add tramp-fuse-unmount-on-cleanup. * lisp/net/tramp.el (tramp-file-name-unify): New defun. (tramp-file-name-equal-p): * lisp/net/tramp-cache.el (tramp-get-connection-property) (tramp-set-connection-property, tramp-flush-connection-property) (tramp-flush-connection-properties): Use it. * lisp/net/tramp-fuse.el (tramp-fuse-get-fusermount): New defun. (tramp-fuse-mount-points): New defvar. (tramp-fuse-unmount): Use it. Delete VEC from `tramp-fuse-mount-points'. Delete mount point. (tramp-fuse-unmount-on-cleanup): New user option. (tramp-fuse-cleanup, tramp-fuse-cleanup-all): New defuns. (top): Adapt `tramp-fuse-unload-hook', `tramp-cleanup-connection-hook', `tramp-cleanup-all-connections-hook' and `kill-emacs-hook'. * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): Add VEC to `tramp-fuse-mount-points'. * test/lisp/net/tramp-tests.el (tramp-fuse-unmount-on-cleanup): Declare. (tramp-test39-make-lock-file-name): Use it.
* Rename elisp-shorthands to read-symbol-shorthandsJoão Távora2021-10-032-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The new name fits better in the family of variables that affect the Lisp reader. Suggested-by: Po Lu <luangruo@yahoo.com> * doc/lispref/symbols.texi (Shorthands): Mention read-symbol-shorthands * lisp/shorthands.el (hack-read-symbol-shorthands) (hack-read-symbol-shorthands) (shorthands-font-lock-shorthands): Use read-symbol-shorthands * lisp/progmodes/elisp-mode.el (elisp--completion-local-symbols) (elisp--completion-local-symbols) (elisp-shorthands): Use read-symbol-shorthands * src/lread.c: (syms_of_lread): Define Vread_symbol_shorthands (oblookup_considering_shorthand): Use Vread_symbol_shorthands. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer): (elisp-shorthand-read-from-string): Use read-symbol-shorthands * test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el Use new symbol name read-symbol-shorthands.
* Font-lock shorthands in elisp-mode for quick visual recognition (bug#50959)João Távora2021-10-031-0/+8
| | | | | | | | | | | | | Only the shorthanded prefix is font-locked. This allows the remainder of the font-lock logic to subsist (e.g. for macro-defining symbols). * lisp/shorthands.el (cl-lib): Require it when compiling. (elisp-shorthand-font-lock-face): New face. (shorthands--mismatch-from-end): New helper. (shorthands-font-lock-shorthands): New helper. * test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el: Add some dummy test code.
* Clarify the purpose of internal--format-docstring-lineStefan Kangas2021-10-031-8/+7
| | | | | | | | | * test/lisp/subr-tests.el (subr-test-internal--format-docstring-line): * lisp/subr.el (internal--format-docstring-line): Make it more clear that this function is not intended for the first line of a docstring. * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add comment explaining why we use 'internal--format-docstring-line'. Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.
* Migrate Xref off EIEIODmitry Gutov2021-10-011-12/+10
| | | | | | | | | | | | | | | | | | | | | | To improve performance and flexibility (bug#50777). * lisp/progmodes/xref.el (xref-location): Remove. (xref-file-location): Change to cl-struct. (xref-buffer-location, xref-bogus-location): Ditto. (xref-item, xref-match-item): Same. And update all method definitions accordingly. (xref--insert-xrefs): Don't use 'oref', use 'xref-item-location'. (xref--insert-xrefs, xref-show-definitions-completing-read): Insetad of 'with-slots', use 'xref-item-summary' and 'xref-item-location'. * lisp/progmodes/etags.el (xref-etags-location): Change from EIEIO class into a cl-struct. (xref-etags-apropos-location): Ditto. Update all method definitions. * test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-test-run): Avoid using 'oref'.
* ; Still working on emba CIMichael Albinus2021-09-302-11/+15
| | | | | | | * test/infra/Dockerfile.emba (emacs-base): Install also acl. * test/infra/gitlab-ci.yml (.test-template): Move 'allow_failure' clause level up.
* ; Mark cl-flet indentation test as failing (bug#9622)Mattias Engdegård2021-09-301-0/+1
|
* ; * test/lisp/emacs-lisp/bytecomp-tests.el: remove ineffective \Mattias Engdegård2021-09-301-1/+1
|
* * test/Makefile.in (WRITE_LOG): Add emacs-module-tests as problematic.Michael Albinus2021-09-291-1/+1
|
* Some inmprovements in emba CI filesMichael Albinus2021-09-292-15/+2
| | | | | | | * test/infra/Dockerfile.emba: Remove superfluous "make -j4". * test/infra/gitlab-ci.yml (.test-template): Add 'allow_failure' clause. (test-all-inotify): Add 'needs' clause.
* ; * test/lisp/electric-tests.el: Reduce python-mode log spam.Mattias Engdegård2021-09-281-31/+35
|
* Adapt tramp-tests.el for macOSMichael Albinus2021-09-281-13/+9
| | | | | * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process): Adapt for macOS.
* Use ert-resource-file in the shorthand testsLars Ingebrigtsen2021-09-282-16/+6
| | | | Also move to the standard directory naming.
* checkdoc: Allow Lisp symbols to start a messageStefan Kangas2021-09-281-0/+37
| | | | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine): Allow Lisp symbols to start a message. (checkdoc--error-bad-format-p): New helper function. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-test-error-format-is-good) (checkdoc-test-error-format-is-bad): New helper functions. (checkdoc-tests-error-message-bad-format-p) (checkdoc-tests-error-message-bad-format-p/defined-symbols) (checkdoc-tests-error-message-bad-format-p/not-capitalized): New tests.
* ; Still more instrumentation on autorevert-tests.elMichael Albinus2021-09-271-9/+12
|
* Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsMichael Albinus2021-09-273-3/+16
|\
| * Fix automatic filling of docstring in cl-defstructStefan Kangas2021-09-271-0/+12
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix bug where a paragraph was filled as if it were a single line, which led to garbled output in the docstring. (Bug#50839) * test/lisp/subr-tests.el (subr-test-internal--format-docstring-line): New test.
| * Fix checkdoc-related test failureLars Ingebrigtsen2021-09-271-1/+2
| |
| * Fix two doc-related test failuresLars Ingebrigtsen2021-09-271-2/+2
| |
* | ; More instrumentation in autorevert-tests.elMichael Albinus2021-09-271-2/+25
|/ | | | | | * test/lisp/autorevert-tests.el (auto-revert-test--instrument-kill-buffer-hook): New defun. (auto-revert-test05-global-notify): More instrumentation.
* Optimize emba buildsMichael Albinus2021-09-272-15/+20
| | | | | | | | * test/infra/Dockerfile.emba (emacs-base): Install also libdbus-1-dev and libacl1-dev. * test/infra/gitlab-ci.yml (prep-image-base): Comment out. This stage is activated by default in Dockerfile.emba.
* Make comint understand the ccrypt password phrasesLars Ingebrigtsen2021-09-271-0/+3
| | | | | | | | * lisp/comint.el (comint-password-prompt-regexp): Add the ccrypt confirmation phrase (bug#50837). * lisp/international/mule-conf.el (password-word-equivalents): Add the ccrypt phrases.
* Add "passwd" (change password) prompt to comintLars Ingebrigtsen2021-09-271-0/+1
| | | | | * lisp/comint.el (comint-password-prompt-regexp): Add "passwd" (to change the password) first promp in Debian bullseye.
* Get a `package-test-signed` to work againdickmao2021-09-274-49/+28
| | | | | | | | The test signing key succumbed to either expiration or bitrot. I hope I didn't just publish my secret key to the world. * test/lisp/emacs-lisp/package-resources/key.pub: Refresh. * test/lisp/emacs-lisp/package-resources/key.sec: Refresh.
* Move test-cl-flet-indentation to the right fileLars Ingebrigtsen2021-09-272-11/+10
|
* Add #_ reader macro to escape shorthand renamingJoão Távora2021-09-272-1/+14
| | | | | | | | | | | | * src/lread.c (read1): Add skip_shorthand variable. Add a '#_' case. If skip_shorthand call oblookup instead of oblookup_considering_shorthand. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-escape): New test. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (#_f-test4---): New fixture function.
* Consider shorthands in Elisp's elisp-completion-at-pointJoão Távora2021-09-272-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of referencing obarray directly, that function has to consider a collection of completions which includes the shorthand versions of some of the symbols. That collection changes from buffer to buffer, depending on the choice of elisp-shorthands. To make this process efficient, and avoid needless recalculation of the above collection, a new obarray-specific cache was invented. The Elisp variable obarray-cache is immediately nullified if something touches the obarray. * lisp/progmodes/elisp-mode.el : New helper. (elisp-completion-at-point): Use new helpers. (elisp--completion-local-symbols) (elisp--fboundp-considering-shorthands) (elisp--bboundp-considering-shorthands): New helpers * src/lread.c (intern_driver): Nullify Qobarray_cache. (syms_of_lread): Add Qobarray_cache. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-completion-at-point): New test. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test-complete-me): New fixture.
* Rework Elisp shorthands to only allow only prefix substitutionJoão Távora2021-09-272-6/+6
| | | | | | | | | | | | | | | | | | | This simplification in requirements makes for more complex C code but that code is much less wasteful in Lisp strings than the previous implementation. * src/lread.c (read1): Rework. (Fintern): Rework. (Fintern_soft): Rework. (Funintern): Rework. (oblookup_considering_shorthand): Rewrite. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer) (elisp-shorthand-read-from-string): Use new format of elisp-shorthands. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test) (f-test2, f-test3): Use new form of elisp-shorthands.
* Move most of the shorthand implementation to C codeJoão Távora2021-09-273-60/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It passes the tests designed for the previous Elisp implementation. Likely, this isn't the final form of the implementation. For one, the reader is much slower and allocates a Lisp string for every atom read, regardless if its already interned or not. This has the potential to be catastrophic in terms of GC. Also rename the main variable to elisp-shorthands, from the repetitive shorthand-shorthands. For some reason, I had to put 'hack-elisp-shorthands' and 'load-with-shorthands-and-code-conversion', the new source-file loading functions, in lisp/international/mule.el. Otherwise, lisp/loadup.el wouldn't see them, for some reason that I didn't investigate. This should probably be fixed. * lisp/shorthand.el: Remove. * test/lisp/shorthand-tests.el: Remove. * src/lread.c: (read1, Fintern, Fintern_soft, Funintern): Use oblookup_considering_shorthand. (oblookup_considering_shorthand): New helper. (syms_of_lread): Declare elisp-shorthands. * lisp/progmodes/elisp-mode.el (elisp-shorthands): Put a safe-local-variable spec. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer) (elisp-shorthand-read-from-string) (elisp-shorthand-byte-compile-a-file) (elisp-shorthand-load-a-file): New tests. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el: New file * lisp/loadup.el (load-source-file-function): Set to load-with-shorthands-and-code-conversion. * lisp/international/mule.el (hack-elisp-shorthands): Move here. (load-with-shorthands-and-code-conversion): And here.
* First Elisp version of lisp/shorthand.el, failing some testsJoão Távora2021-09-271-0/+60
| | | | | | * lisp/shorthand.el: New file * test/lisp/shorthand-tests.el: New file