summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* Add the new macro with-suppressed-warningsLars Ingebrigtsen2019-06-121-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): New macro. * doc/lispref/compile.texi (Compiler Errors): Document with-suppressed-warnings and deemphasise with-no-warnings slightly. * lisp/emacs-lisp/bytecomp.el (byte-compile--suppressed-warnings): New internal variable. (byte-compile-warning-enabled-p): Heed byte-compile--suppressed-warnings, bound via with-suppressed-warnings. (byte-compile-initial-macro-environment): Provide a macro expansion of with-suppressed-warnings. (byte-compile-file-form-with-suppressed-warnings): New byte hunk handler for the suppressed symbol machinery. (byte-compile-suppressed-warnings): Ditto for the byteop. (byte-compile-file-form-defmumble): Ditto. (byte-compile-form, byte-compile-normal-call) (byte-compile-normal-call, byte-compile-variable-ref) (byte-compile-set-default, byte-compile-variable-set) (byte-compile-function-form, byte-compile-set-default) (byte-compile-warn-obsolete, byte-compile--declare-var): Pass the symbol being warned in to byte-compile-warning-enabled-p. * test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): New function. (bytecomp-test--with-suppressed-warnings): Tests.
* Keep auto-revert-mode working when changing buffer file name (bug#36159)Mattias Engdegård2019-06-111-0/+34
| | | | | | | | | | * lisp/autorevert.el (after-set-visited-file-name-hook): Add unconditionally. (global-auto-revert-mode): Don't use `after-set-visited-file-name-hook' here. (auto-revert-set-visited-file-name): Rename from `auto-revert--global-set-visited-file-name' and generalise. * test/lisp/autorevert-tests.el (auto-revert-test06-write-file): New.
* Minor fixes on tramp-tests.el for w32Michael Albinus2019-06-111-8/+11
| | | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Ignore absence of tput. (tramp-test43-asynchronous-requests): Don't start watchdog on w32.
* Don't keep warning about unescaped literals (Bug#36068)Noam Postavsky2019-06-101-13/+19
| | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Restore lost let-binding of lread--unescaped-character-literals, so that unescaped literals warning will only apply to the form just read. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--unescaped-char-literals): Expand test to check that we don't keep warning about old unescaped literals.
* Make tramp-test43-asynchronous-requests working, againMichael Albinus2019-06-101-40/+77
| | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-list-tramp-buffers): Declare `tramp-list-tramp-buffers'. (tramp--test-ignore-make-symbolic-link-error) (tramp--test-ignore-add-name-to-file-error): Improve declaration. (tramp--test-with-proper-process-name-and-buffer): New macro. (tramp-test43-asynchronous-requests): Use the macro for timer, process filter and process sentinel. Comment the remote file operation in the timer. Remove further async events. Accept output from all processes.
* Fix copy-paste error in autorevert-testMattias Engdegård2019-06-101-1/+1
| | | | * test/lisp/autorevert-tests.el: Use correct name to define a remote test.
* Add tests for mail/uudecode.elStefan Kangas2019-06-093-0/+124
| | | | | | | * lisp/mail/uudecode.el: Remove redundant :group usage. * test/lisp/mail/uudecode-resources/uudecoded.txt, test/lisp/mail/uudecode-resources/uuencoded.txt, test/lisp/mail/uudecode-tests.el: New files.
* Use lexical-binding in password-cache.el and add testsStefan Kangas2019-06-091-0/+75
| | | | | * lisp/password-cache.el: Use lexical-binding. * test/lisp/password-cache-tests.el: New file.
* Use lexical-binding in underline.el and add testsStefan Kangas2019-06-091-0/+42
| | | | | | * lisp/textmodes/underline.el: Use lexical-binding. * test/lisp/textmodes/underline-tests.el: New file. (Bug#36063)
* Fix failures of term-tests on MS-WidowsEli Zaretskii2019-06-071-0/+8
| | | | | | | | * test/lisp/term-tests.el (term-simple-lines) (term-carriage-return, term-line-wrap, term-cursor-movement) (term-scrolling-region, term-set-directory) (term-line-wrapping-then-motion, term-to-margin): Skip tests on MS-Windows and MS-DOS.
* Add "pin" to password-word-equivalents (Bug#35523)Noam Postavsky2019-06-061-0/+1
| | | | | | * lisp/international/mule-conf.el (password-word-equivalents): Add "pin". * test/lisp/comint-tests.el (comint-testsuite-password-strings): Add test case.
* Keep nxml prolog updated via syntax-propertizeNoam Postavsky2019-06-051-0/+18
| | | | | | | | | | | | | | | Instead of using after-change-functions. Also, stop consulting nxml-prolog-regions during syntax-propertize. It turns out the problems fixed by using prolog information are actually due to using the wrong syntax table during propertizing. This was fixed in 2019-06-04 "* lisp/emacs-lisp/syntax.el: Use syntax-ppss-table for syntax-propertize." so consulting the prolog data is no longer needed. * lisp/nxml/nxml-rap.el (nxml-maybe-rescan-prolog): Remove. * lisp/nxml/nxml-mode.el (nxml-mode): Stop using it. (nxml-syntax-propertize): Don't use nxml-prolog-regions, just call nxml-scan-prolog if needed before delegating to sgml-syntax-propertize. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode-edit-prolog): New test.
* ; Add test for Bug#36092Noam Postavsky2019-06-051-0/+15
| | | | | * test/lisp/nxml/nxml-mode-tests.el (nxml-mode->-after-quote): New test.
* Don't sgml-syntax-propertize-inside XML prolog (Bug#32823)Noam Postavsky2019-06-041-0/+21
| | | | | | | * lisp/nxml/nxml-mode.el (nxml-syntax-propertize): New function. (nxml-mode): Use it as the syntax-propertize-function. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode-doctype-and-quote-syntax) (nxml-mode-prolog-comment): New tests.
* Fix some SGML syntax edge cases (Bug#33887)Noam Postavsky2019-06-041-7/+38
| | | | | | | | | * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Handle single and double quotes symmetrically. Don't skip quoted comment enders. * test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax): Add more test cases. (sgml-mode-quote-in-long-text): New test.
* Stronger check for Tramp methodMichael Albinus2019-06-042-249/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection): Use `tramp-get-connection-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link): Don't check remote TARGET. * lisp/net/tramp.el (tramp-dissect-file-name): Check for proper method. (tramp-file-name-for-operation): Take only 2nd argument into account for file name handler. (tramp-file-name-handler): Suppress checks for `file-remote-p'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test02-file-name-dissect): Suppress check for wrong method. * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case): Dump *all* Tramp buffers. (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate): Check also wrong method. (tramp-test03-file-name-defaults): Check, that the respective Tramp package is loaded. (tramp-test04-substitute-in-file-name) (tramp-test05-expand-file-name) (tramp-test06-directory-file-name, tramp-test44-auto-load): Suppress check for wrong method. (tramp-test30-make-process): Remove instrumentation code. (tramp-test31-interrupt-process, tramp-test36-vc-registered): Guarantee that connection is established prior starting process.
* * lisp/char-fold.el (char-fold-make-table): New functionJuri Linkov2019-06-031-22/+28
| | | | | | | | with body extracted from INITVALUE of defconst (bug#35689). Bind search-spaces-regexp to nil (bug#35802). * test/lisp/char-fold-tests.el: Relocate helpers to file beginning. (char-fold--test-bug-35802): New test.
* Skip some flymake tests on hydra.nixos.orgGlenn Morris2019-06-011-0/+3
| | | | | | * test/lisp/progmodes/flymake-tests.el (perl-backend) (included-c-header-files, recurrent-backend): Skip on hydra.nixos due to frequent intermittent failures. (Bug#32764)
* Use lexical-binding in morse.el and studly.el and add testsStefan Kangas2019-06-012-0/+112
| | | | | | | * lisp/play/morse.el: Use lexical-binding. * lisp/play/studly.el: Use lexical-binding. * test/lisp/play/morse-tests.el: New file. * test/lisp/play/studly-tests.el: New file.
* Use lexical-binding in paragraphs.el and add testsStefan Kangas2019-06-011-0/+165
| | | | | | * lisp/textmodes/paragraphs.el: Use lexical-binding. (repunctuate-sentences): Make it work non-interactively. * test/lisp/textmodes/paragraphs-tests.el: New file.
* Fix `cl-member' and `cl-assoc' for bignumsMattias Engdegård2019-06-011-0/+8
| | | | | * lisp/emacs-lisp/cl-seq.el (cl-member, cl-assoc): Work with bignums. * test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-bignum-eql): New.
* Merge from origin/emacs-26Glenn Morris2019-06-012-6/+36
|\ | | | | | | | | | | 134edc1 Warn about wrong number of args for subrs (Bug#35767) 5f01af6 Use plain symbols for eieio type descriptors (Bug#29220) 4b24b01 Pacify GCC 9 -Wredundant-decls
| * Warn about wrong number of args for subrs (Bug#35767)Noam Postavsky2019-05-301-0/+14
| | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't assume byte-compile-fdefinition will return non-nil. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn-wrong-args) (bytecomp-warn-wrong-args-subr): New tests.
| * Use plain symbols for eieio type descriptors (Bug#29220)Noam Postavsky2019-05-301-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Emacs 26, eieio objects use a class record (with circular references) as the type descriptor of the object record. This causes problems when reading back an object from a string, because the class record is not `eq' to the canonical one (which means that read objects don't satisfy the foo-p predicate). * lisp/emacs-lisp/eieio.el (make-instance): As a (partial) fix, set the record's type descriptor to a plain symbol for the type descriptor when eieio-backward-compatibility is non-nil (the default). * lisp/emacs-lisp/eieio-core.el (eieio--object-class): Call eieio--class-object on the type tag when eieio-backward-compatibility is non-nil. (eieio-object-p): Use eieio--object-class instead of eieio--object-class-tag. * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (eieio-test-persist-hash-and-vector) (eieio-test-persist-interior-lists): Make into functions. (eieio-persist-hash-and-vector-backward-compatibility) (eieio-persist-hash-and-vector-no-backward-compatibility) (eieio-test-persist-interior-lists-backward-compatibility) (eieio-test-persist-interior-lists-no-backward-compatibility): New tests which call them, eieio-backward-compatibility let-bound.
* | Use lexical-binding in page.el and add testsSimen Heggestøyl2019-06-011-0/+86
| | | | | | | | | | | | | | * lisp/textmodes/page.el: Use lexical-binding. (forward-page): Replace `(if x nil y)' with `(unless x y)'. * test/lisp/textmodes/page-tests.el: New file with tests for page.el.
* | Use lexical-binding in timezone.el and add testsStefan Kangas2019-06-011-0/+169
| | | | | | | | | | * lisp/timezone.el: Use lexical-binding. * test/lisp/timezone-tests.el: New file.
* | Use lexical-binding in autoinsert.el and add testsSimen Heggestøyl2019-05-311-0/+104
| | | | | | | | | | | | | | | | | | * lisp/autoinsert.el: Use lexical-binding. Remove redundant :group args. (auto-insert): Simplify. * test/lisp/autoinsert-tests.el: New file with tests for autoinsert.el.
* | * lisp/subr.el (add-hook): Turn `append` into `depth` (bug#35508)Stefan Monnier2019-05-291-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to control the relative ordering of functions on hooks by specifying `depth` in the same was as was possible with `add-function`. * lisp/electric.el (electric--sort-post-self-insertion-hook): Delete function. (electric-indent-mode, electric-layout-mode, electric-quote-mode): * lisp/elec-pair.el (electric-pair-mode): Use new `depth` arg instead of electric--sort-post-self-insertion-hook. * lisp/emacs-lisp/syntax.el (syntax-propertize, syntax-ppss): Use new `depth` arg to make sure noone accidentally gets added after syntax-ppss-flush-cache. * doc/lispref/modes.texi (Setting Hooks): Document new `depth` arg. * test/lisp/subr-tests.el (subr-tests-add-hook-depth): New test.
* | Use lexical-binding in makesum.el and add testsSimen Heggestøyl2019-05-291-0/+58
| | | | | | | | | | | | | | | | * lisp/makesum.el: Use lexical-binding. (make-command-summary): Replace `if..progn' with `when'. (double-column): Add docstring and apply trivial simplifications. * test/lisp/makesum-tests.el: New file with tests for makesum.el.
* | * lisp/international/mule-cmds.el (encode-coding-char): Fix ASCII caseStefan Monnier2019-05-281-0/+4
| | | | | | | | | | | | | | | | | | | | Don't bother with string-as-multibyte since `string` already returns multibyte when needed. Don't forget to encode when the string is ASCII, e.g. for ebcdic case and to make sure we always return a unibyte string. * test/lisp/international/mule-tests.el (mule-cmds-tests--encode-ebcdic): New test.
* | * test/lisp/autorevert-tests.el: Give on on remote hydra.nixos tests.Glenn Morris2019-05-271-3/+1
| | | | | | | | (auto-revert--test-enabled-remote): Disable on hydra.nixos.
* | * test/lisp/autorevert-tests.el: Try to fix remote hydra.nixos tests.Glenn Morris2019-05-271-0/+3
| |
* | Correctly eliminate duplicate cases in switch compilationMattias Engdegård2019-05-271-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix code mistakes that prevented the correct elimination of duplicated cases when compiling a `cond' form to a switch bytecode, as in (cond ((eq x 'a) 1) ((eq x 'b) 2) ((eq x 'a) 3) ; should be elided ((eq x 'c) 4)) Sometimes, this caused the bytecode to use the wrong branch (bug#35770). * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-vars): Return obj2 eval'ed. (byte-compile-cond-jump-table-info): Discard redundant condition. Use `obj2' as evaluated. Discard duplicated cases instead of failing the table generation. * test/lisp/emacs-lisp/bytecomp-tests.el (toplevel): Require subr-x. (byte-opt-testsuite-arith-data, bytecomp-test--switch-duplicates): Test.
* | ; Fix read-multiple-choice testNoam Postavsky2019-05-261-1/+1
| | | | | | | | | | | | * test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice): Rebind read-event, read-multiple-choice uses that since 2019-05-26 "Avoid infloop in read-multiple-choice (Bug#32257)".
* | Tweak recent additions in tabify-tests.elBasil L. Contovounesios2019-05-261-6/+6
| | | | | | | | | | | | | | | | * test/lisp/tabify-tests.el (tabify-tests--test-changes): Rename third argument to avoid "lexical argument shadows dynamic variable" warnings. Use mapconcat in place of mapcar+concat. (tabify-tests-untabify, tabify-tests-tabify): Quote function symbols as such.
* | Use lexical-binding in paren.el and add testsSimen Heggestøyl2019-05-261-0/+121
| | | | | | | | | | | | | | * lisp/paren.el: Use lexical-binding. (show-paren--default): Use imperative form in doc-string. * test/lisp/paren-tests.el: New file with tests for paren.el.
* | Update author/maintainer infoPaul Eggert2019-05-262-2/+2
| | | | | | | | | | Update email addresses and fix spellings of some author and maintainer names.
* | Remove Maintainer: when it duplicates Author:Paul Eggert2019-05-261-1/+0
| | | | | | | | | | | | | | The convention is that a file with Author: but not Maintainer: means the author is a maintainer, which makes it confusing when a file lists the same person as author and maintainer. Avoid the confusion by removing the duplicate Maintainer: line.
* | Use lexical-binding in tabify.el and add testsStefan Kangas2019-05-251-0/+79
| | | | | | | | | | * lisp/tabify.el: Use lexical-binding. * test/lisp/tabify-tests.el: New file.
* | Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-2512-0/+16
| | | | | | | | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* | Add "Enter Auth" prompt handling for OpenVPN (Bug#35724)Matthew Bauer2019-05-241-0/+1
| | | | | | | | | | * lisp/comint.el (comint-password-prompt-regexp): Allow "Enter Auth" at the beginning.
* | * lisp/textmodes/sgml-mode.el: Fix lone `>` in sgml textStefan Monnier2019-05-221-0/+4
| | | | | | | | | | | | | | | | | | | | (sgml--syntax-propertize-ppss):New variable and function. (sgml-syntax-propertize-rules): Use it. Don't ignore quotes not followed by a matching quote or a '>' or '<'. (sgml-syntax-propertize): Set up sgml--syntax-propertize-ppss. * test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax): Add test for lone '>'.
* | Use lexical-binding in tempo.el and add testsFederico Tedin2019-05-211-0/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | For discussion, see the following thread: https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00395.html * lisp/tempo.el: Use lexical-binding. (tempo-define-template): Expand documentation to mention `tempo-user-elements'. (tempo-local-tags, tempo-collection, tempo-dirty-collection) (tempo-marks, tempo-match-finder): Define with defvar-local. (tempo-named-insertions, tempo-region-start, tempo-region-stop): Make them automatically buffer-local. * test/lisp/tempo-tests.el: Add tests for tempo.el.
* | Allow zero-argument rx `or' and `seq' formsMattias Engdegård2019-05-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | Make the rx `or' and `seq' forms accept zero arguments to produce a never-matching regexp and an empty string, respectively. * lisp/emacs-lisp/rx.el: Require cl-extra. (rx-constituents, rx-or): Permit zero args. (rx): Amend doc string for `or' and `seq'. * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change. * etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
* | Revert "Allow zero-argument rx `or' and `seq' forms"Mattias Engdegård2019-05-201-7/+1
| | | | | | | | | | This reverts commit b552fc05c231ca6800330a318d3a74ddd0f5a13c. It caused a bootstrapping failure which I have yet to resolve - sorry.
* | Use lexical-binding in delim-col.el and add testsStefan Kangas2019-05-201-0/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Basil L. Contovounesios for additional cleanups. For discussion, see the following thread: https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00177.html * lisp/delim-col.el: Use lexical-binding. * test/lisp/delim-col-tests.el: New file. (delim-col-tests-delimit-colummns-before-after) (delim-col-tests-delimit-columns) (delim-col-tests-delimit-columns-format/nil) (delim-col-tests-delimit-columns-format/padding) (delim-col-tests-delimit-columns-format/separator) (delim-col-tests-delimit-columns-separator) (delim-col-tests-delimit-columns-str-before-after) (delim-col-tests-delimit-columns-str-separator) (delim-col-tests-delimit-rectangle): New unit tests.
* | Allow zero-argument rx `or' and `seq' formsMattias Engdegård2019-05-201-1/+7
| | | | | | | | | | | | | | | | | | | | Make the rx `or' and `seq' forms accept zero arguments to produce a never-matching regexp and an empty string, respectively. * lisp/emacs-lisp/rx.el (rx-constituents, rx-or): Permit zero args. (rx): Amend doc string for `or' and `seq'. * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change. * etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
* | Avoid polling in global-auto-revert-mode (bug#35418)Mattias Engdegård2019-05-201-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `auto-revert-avoid-polling' have effect in global-auto-revert-mode. Buffers actually handled by that mode are marked with a non-nil value of `auto-revert--global-mode'. When global-auto-revert-mode is entered, eligible buffers are marked in that way, and hooks are set up to mark new buffers and take care of buffers whose file names change. This way the existing poll-avoidance logic can be used, since the entire set of buffers in auto-revert is known. A new hook, `after-set-visited-file-name-hook', was added to handle the case when the file name of a tracked buffer changes. * lisp/autorevert.el (auto-revert-avoid-polling): Amend doc string. (auto-revert--global-mode): New buffer-local variable. (global-auto-revert-mode): Mark existing buffers and set up hooks when mode is entered; do the opposite when exited. (auto-revert--global-add-current-buffer) (auto-revert--global-adopt-current-buffer) (auto-revert--set-visited-file-name-advice): New functions. (auto-revert--polled-buffers, auto-revert--need-polling-p) (auto-revert-notify-handler) (auto-revert-active-p): Modify logic to cover global-auto-revert-mode. * lisp/files.el (after-set-visited-file-name-hook): New hook. (set-visited-file-name-hook): Call new hook. * test/lisp/autorevert-tests.el (top): Use lexical-binding. (auto-revert-test--write-file, auto-revert-test--buffer-string) (auto-revert-test--wait-for, auto-revert-test--wait-for-buffer-text) (auto-revert-test05-global-notify): New test. * doc/lispref/hooks.texi (Standard Hooks): Mention new hook (in a comment, since it's unclear whether it should actually be documented here) * etc/NEWS (Changes in Specialized Modes and Packages): Update entry.
* | Fix problems in autorevert-testsMichael Albinus2019-05-201-2/+3
| | | | | | | | | | | | | | * test/lisp/autorevert-tests.el (auto-revert--deftest-remote): Fix typo. (auto-revert-test02-auto-revert-deleted-file): On emba, there are no stopped events.
* | Fixes for "Maintainer:" and related linesPaul Eggert2019-05-1912-16/+0
| | | | | | | | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.