summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* Disable filling of warnings in a bytecomp testGlenn Morris2019-06-161-1/+2
| | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): Disable filling rather than working around it.
* Merge from origin/emacs-26Glenn Morris2019-06-151-2/+2
|\ | | | | | | | | 7a8f22b * test/lisp/url/url-file-tests.el (url-file): Use file:///, n... 0c5f6c6 Fix doc of srecompile-compile-split-code (Bug#36200)
| * * test/lisp/url/url-file-tests.el (url-file): Use file:///, not file://.Juanma Barranquero2019-06-151-2/+2
| |
* | Also test unpackingLars Ingebrigtsen2019-06-151-0/+26
| |
* | Refactor for reuseLars Ingebrigtsen2019-06-151-28/+31
| |
* | New file to test bindat functionsLars Ingebrigtsen2019-06-151-0/+70
| |
* | Some changes in process output read of TrampMichael Albinus2019-06-151-1/+2
| | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-handle-file-notify-rm-watch): Read pending output. * test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process): Use a timeout when reading process output.
* | Tag remote autorevert tests as unstableMichael Albinus2019-06-151-10/+10
| | | | | | | | | | | | | | | | * test/lisp/autorevert-tests.el (auto-revert--timeout): Derive value from `auto-revert-interval'. (auto-revert--deftest-remote): Tag it as `:unstable'. (auto-revert-test05-global-notify, auto-revert-test06-write-file): Suppress final newline. Use `auto-revert--timeout'.
* | Fix problem in remote file notificationMichael Albinus2019-06-141-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter): Do not kill the process. Let `file-notify-rm-watch' do the job. * test/lisp/filenotify-tests.el (file-notify-test03-events) (file-notify-test05-file-validity) (file-notify-test09-watched-file-in-watched-dir): Do not special-case remote files.
* | Stop a tramp test leaving a file behindGlenn Morris2019-06-131-0/+1
| | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test10-write-region-file-precious-flag): Avoid leaving a backup file after we are done.
* | Allow for line breaks in a bytecomp testGlenn Morris2019-06-121-0/+1
| | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): Warnings from the byte compiler may be filled.
* | Add more ps-mode octal testsLars Ingebrigtsen2019-06-131-1/+12
| | | | | | | | | | * test/lisp/progmodes/ps-mode-tests.el (ps-mode-test-octal-region-multibyte): New test.
* | Add ps-mode-tests.el and remove a compilation warningLars Ingebrigtsen2019-06-131-0/+37
| | | | | | | | | | | | * lisp/progmodes/ps-mode.el (ps-mode-octal-region): Remove a string-make-unibyte that apparently had no effect here. * test/lisp/progmodes/ps-mode-tests.el: New file.
* | New file rfc2104-tests.elLars Ingebrigtsen2019-06-131-0/+39
| | | | | | | | * test/lisp/net/rfc2104-tests.el: New file to test rfc2104 hashes.
* | Give more information in a bytecomp test failureGlenn Morris2019-06-121-2/+2
| | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): More informative failure messages.
* | 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.