summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-163-13/+13
|
* Tramp code cleanupMichael Albinus2021-09-161-11/+23
| | | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-methods) <telnet, nc>: Reintroduce "%n" marker. (tramp-maybe-open-connection): Handle it. * lisp/net/tramp.el (tramp-prefix-regexp): * lisp/net/tramp-smb.el (tramp-smb-options): Fix docstring. * lisp/net/tramp*.el: Fix typos. Remove trailing space from `yes-or-no-p' and `y-or-n-p' prompts. * test/lisp/net/tramp-tests.el (tramp--test-telnet-p): New defun. (tramp-test29-start-file-process, tramp-test30-make-process) (tramp-test35-remote-path, tramp-test44-asynchronous-requests): Adapt tests.
* Change the erc debug logging format to be more repeatableF. Jason Park2021-09-161-0/+35
| | | | | | | | | | | | | | | | | * erc.el (erc-debug-irc-protocol): Fix line-ending mismatch between incoming and outgoing logger lines without changing interface. Do this by adding carriage returns to the latter to improve machine readability. Change printed peer labels to most accurately reflect logical endpoints. (erc-debug-irc-protocol-time-format): Add new variable to support timestamps in protocol logger output. (erc-debug-irc-protocol-version): Add new variable to help tooling track logging format independent of ERC and Emacs versions. (erc-toggle-debug-irc-protocol): Add headers to protocol-log buffer to aid future bug-reproduction tools. Clean up overlong lines (bug#50009).
* Fix erc nick trimmingF. Jason Park2021-09-161-0/+80
| | | | | | | | | | | * lisp/erc/erc.el (erc-lurker-maybe-trim): Prevent warning from showing up in third-party code using this function by autoloading rx.el when needed. Remove trailing chars appended for uniquifying purposes when a nick is already taken. Special thanks to Mattias Engdegård for making this more respectable (Bug#50005). * test/lisp/erc/erc-tests.el: Add tests for the above and require erc-networks.
* Fix mistake in test for erc-ring-previous-commandF. Jason Park2021-09-161-4/+7
| | | | | | * test/lisp/erc/erc-tests.el (erc-ring-previous-command): The variable erc-send-completed-hook was previously set to nil permanently, which would affect other tests (bug#50005).
* Update Unicode support to Unicode version 14.0.0Eli Zaretskii2021-09-151-43/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/unidata/copyright.html: * admin/unidata/UnicodeData.txt: * admin/unidata/Blocks.txt: * admin/unidata/BidiBrackets.txt: * admin/unidata/BidiMirroring.txt: * admin/unidata/IVD_Sequences.txt: * admin/unidata/NormalizationTest.txt: * admin/unidata/SpecialCasing.txt: * test/manual/BidiCharacterTest.txt: Updated files from Unicode 14.0. * lisp/international/fontset.el (script-representative-chars): Add new scripts. (otf-script-alist): Update from latest version. (setup-default-fontset): Add new scripts. * lisp/international/characters.el: Update syntax and category tables for new characters and scripts. (char-width-table): Update for changes in Unicode 14.0. * lisp/international/mule-cmds.el (ucs-names): Update used and unused ranges per Unicode 14.0. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--failing-lines-part1) (ucs-normalize-tests--failing-lines-part2): Update per the test results. * doc/lispref/nonascii.texi (Character Properties): Update Unicode version number. * etc/NEWS: Announce support for Unicode 14.0. * admin/notes/unicode: Minor copyedits.
* Localize namespace-filtering codeDmitry Gutov2021-09-151-7/+18
| | | | | | | | | | | | | | | | | To be able to filter results coming from elisp-xref-find-def-functions, and for general ease of understanding. * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Undo the previous change. (xref-backend-apropos): Update accordingly. (elisp--xref-filter-definitions): New function. (xref-backend-definitions): Use it to post-filter the results coming from elisp--xref-find-definitions. * test/lisp/progmodes/elisp-mode-tests.el (find-defs-minor-defvar-c): New test. (find-defs-defun-defvar-el): Update test.
* cperl-mode.el: Allow non-ASCII Perl identifiersHarald Jörg2021-09-142-1/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all "A-Z" regexp literals with unicode-aware rx constructs wherever Perl allows non-ASCII identifiers. * lisp/progmodes/cperl-mode.el (cperl-after-sub-regexp) (cperl-after-label. cperl-sniff-for-indent) (cperl-find-pods-heres, cperl-indent-exp) (cperl-fix-line-spacing, cperl-imenu--create-perl-index) (cperl-init-faces, cperl-find-tags): Replace ASCII regex literals by unicode-aware rx constructs. (cperl-init-faces): Eliminate unused lexical `font-lock-anchored'. (cperl-have-help-regexp, cperl-word-at-point-hard): Allow non-ASCII word characters. * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-fontify-special-variables): New test for $^T and $^{VARNAME}. (cperl-test-ws-rx cperl-test-ws+-rx), (cperl-test-version-regexp, cperl-test-package-regexp): Skip for perl-mode. (cperl-test-identifier-rx, cperl--test-unicode-setup) (cperl-test-unicode-labels, cperl-test-unicode-sub) (cperl-test-unicode-varname) (cperl-test-unicode-varname-list, cperl-test-unicode-arrays) (cperl-test-unicode-hashes, cperl-test-unicode-hashref) (cperl-test-unicode-proto, cperl-test-unicode-fhs) (cperl-test-unicode-hashkeys, cperl-test-word-at-point): New tests for unicode identifiers. (cperl-test-imenu-index): Add a unicode identifier to the test. * test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add a function with non-ASCII name for imenu tests.
* Keep and report "foreign" diangnostics in flymake-cc Flymake backendJoão Távora2021-09-142-0/+7
| | | | | | | | | | | | | | | | This includes diagnostics for .h files that sprang up when checking a c file. Those diagnostics are reported to the Flymake infrastructure which does not (yet) do anything with them. This includes a change to the test fixtures, too. * lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics): Rework * test/lisp/progmodes/flymake-resources/another-problematic-file.c: New file. * test/lisp/progmodes/flymake-resources/some-problems.h: Add a function declaration..
* Fix the testsDmitry Gutov2021-09-131-8/+18
| | | | | | | | * test/lisp/progmodes/xref-tests.el (xref--xref-file-name-display-is-abs) (xref--xref-file-name-display-is-nondirectory) (xref--xref-file-name-display-is-relative-to-project-root): Update for the latest change in xref.el.
* ; Minor doc fixes found by checkdocStefan Kangas2021-09-131-5/+5
|
* Improve checkdoc abbreviation handlingStefan Kangas2021-09-131-0/+24
| | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): New helper function. (checkdoc-sentencespace-region-engine): Fix handling abbreviations after escaped parenthesis. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests-in-abbrevation-p) (checkdoc-tests-in-abbrevation-p/with-parens) (checkdoc-tests-in-abbrevation-p/with-escaped-parens): New tests.
* ; Fix symbol quoting typosStefan Kangas2021-09-122-5/+5
|
* Infer identifier namespace in elisp xref backendMattias Engdegård2021-09-121-0/+111
| | | | | | | | | | | | | | | | | | Improve the accuracy of `xref-find-definitions` by inferring the likely namespace of the sought identifier from its context. This reduces the number of irrelevant search hits when it is clear what kind of identifier is being looked for (such as showing a variable when the user looks for a function). Co-written with Dmitry Gutov. * lisp/progmodes/elisp-mode.el (elisp--xref-list-index) (elisp--xref-infer-namespace, xref-backend-identifier-at-point): New. (xref-backend-definitions): Use the buffer position for inferring. (elisp--xref-find-definitions): Use the inferred namespace. (xref-backend-apropos): Adapt call. * test/lisp/progmodes/elisp-mode-tests.el (elisp-mode-test--with-buffer) (elisp-mode-with-buffer, elisp-mode-infer-namespace): New tests.
* Propagate aliased lexical variables in byte compilerMattias Engdegård2021-09-111-0/+44
| | | | | | | | | | | | | | | | | | | | | | Replace uses of a variable aliasing another variable with that aliased variable, to allow for variable removal when possible. This also enables opportunities for other optimisations. Example: (let ((y x)) (f y)) => (f x) The optimisation is only performed if both aliased and aliasing variables are lexically bound. Shadowing bindings are α-renamed when necessary for correctness. Example: (let* ((b a) (a EXPR)) (f a b)) => (let* ((a{new} EXPR)) (f a{new} a)) * lisp/emacs-lisp/byte-opt.el (byte-optimize--aliased-vars): New. (byte-optimize-form-code-walker): Cancel aliasing upon mutation. (byte-optimize--rename-var-body, byte-optimize--rename-var): New. (byte-optimize-let-form): Add the optimisation. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add relevant test cases.
* Tramp code cleanupMichael Albinus2021-09-111-32/+13
| | | | | | | | | | | | | * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory): Simplify. * lisp/net/tramp-sh.el (tramp-methods) <telnet, nc>: Don't use "%n" marker. * test/lisp/net/tramp-tests.el (tramp-test13-make-directory): Merge with `tramp-test-make-directory-helper' and `tramp-test13-make-directory-with-file-modes'. (tramp-test44-asynchronous-requests): Use always the same operation in timer.
* Fix test find-defs-defgeneric-elDmitry Gutov2021-09-101-0/+6
| | | | | * test/lisp/progmodes/elisp-mode-tests.el (find-defs-defgeneric-el): Fix the test. Reported by dick.r.chiang@gmail.com.
* Tramp: honor default file modes in make-directoryStephen Gildea2021-09-101-17/+45
| | | | | | | | | | | | | * lisp/net/tramp-sh.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-sudoedit.el: * lisp/net/tramp-gvfs.el: Add support for default file modes to relevant Tramp back ends for make-directory. (Closes: Bug#50410) * test/lisp/net/tramp-tests.el (tramp-test13-make-directory-with-file-modes): New test. * etc/NEWS: Note this enhancement. Thanks to Michael Albinus for helping improve this patch.
* Change ruby-align-chained-calls indendationStefan Monnier2021-09-091-1/+28
| | | | | | | | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Align with the first sibling on the previous line instead of the last (bug#32496). That is, before it used to be one.two.three .four and now it is one.two.three .four
* cperl-mode.el: Use rx sequences for Perl grammarHarald Jörg2021-09-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following advice by Mattias Engdegård, most uses of rx-to-string were eliminated, and rx sequences used instead to define Perl grammar components. * lisp/progmodes/cperl-mode.el: (cperl-block-declaration-p): New function, replaces regexp literals. (cperl-imenu--function-name-regexp-perl): Deleted, use rx sequences to find imenu entries instead. (cperl-indent-line): Use rx components instead of regexp literals. (cperl-sniff-for-indent): use `cperl-block-declaration-p' to increase accuracy, use rx sequence for labels to replace inaccurate regexp literals. (cperl-block-p): Replace inline comment by docstring. Use `cperl-block-declaration-p'. (cperl-after-block-p): Use `cperl-block-declaration-p'. (cperl-after-block-and-statement-beg): Replace inline comment by docstring. (cperl-imenu-package-keywords), (cperl-imenu-sub-keywords), (cperl-imenu-pod-keywords) : New variables to sort imenu entries into categories. (cperl-imenu--create-perl-index): Use rx sequences to collect imenu entries. (cperl-init-faces): Use rx components instead of regexp literals for labels. * test/lisp/progmodes/cperl-mode-tests.el: Test rx sequences instead of regexp strings
* Fix encoding in browse-url-encode-urlLars Ingebrigtsen2021-09-071-4/+4
| | | | | | | * lisp/net/browse-url.el (browse-url-url-encode-chars): Document what the argument really is, and simplify the implementation (bug#50435). (browse-url-encode-url): Encode spaces.
* Adapt tramp-test26-file-name-completionMichael Albinus2021-09-071-22/+2
| | | | | * test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion): Do not check for default method.
* * test/lisp/vc/vc-tests.el (vc-test--version-diff): Git env tweak.A2021-09-061-0/+8
|
* Optimise `member` and `assoc` (etc) with constant empty listMattias Engdegård2021-09-061-0/+15
| | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-assq): New. (byte-optimize-member, byte-optimize-assoc, byte-optimize-memq): When the list argument is constant nil, the result is always nil. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test cases.
* ; * test/lisp/newcomment-tests.el: Fix copyright year.Stefan Kangas2021-09-061-1/+1
|
* project--files-in-directory: Fix handling of ignoresDmitry Gutov2021-09-062-0/+23
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/project.el (project--files-in-directory): Pass "." as the DIR argument to 'find' because otherwise the ignore expression can match the project root directory name, which we don't want to happen (bug#50240). Fixup the resulting file names at the end with concatenation. Originally I thought it could lead to worse performance, but the results show equal or slightly better timings. * lisp/progmodes/xref.el (xref-matches-in-directory): Apply a similar fix. (xref--find-ignores-arguments): Use file-name-as-directory, so that when passed "." replace-match still had the expected effect. * test/lisp/progmodes/project-tests.el (project-ignores-bug-50240): New test. * test/lisp/progmodes/xref-tests.el (xref-matches-in-directory-filters-with-ignores): New test.
* Try to fix vc-test-git06-version-diff on HydraDmitry Gutov2021-09-061-7/+4
| | | | | | * test/lisp/vc/vc-tests.el (vc-test--version-diff): Fix Git backend when running in clean environment. (vc-test-git06-version-diff): Unskip on Hydra.
* * test/lisp/vc/vc-tests.el (vc-test-git06-version-diff): Skip on hydra.Glenn Morris2021-09-051-0/+3
|
* Autoload cl-struct-slot-infoLars Ingebrigtsen2021-09-051-1/+0
| | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-struct-slot-info): Autoload (bug#50301). * test/lisp/emacs-lisp/memory-report-tests.el: Don't require cl-macs.
* Cleanup tramp-tests.elMichael Albinus2021-09-051-2/+5
| | | | | | | * test/lisp/net/tramp-tests.el (tramp--test--deftest-direct-async-process): Fix macro declaration. (tramp-test29-start-file-process, tramp-test30-make-process): Do not run connection type test for direct async processes.
* * test/lisp/vc/vc-tests.el (vc-test-sccs06-version-diff): Fix it.Glenn Morris2021-09-041-2/+2
|
* Fix test on machines with Bzr not set upDmitry Gutov2021-09-051-1/+3
| | | | | * test/lisp/vc/vc-tests.el (vc-test--version-diff): Add EMAIL= to the environment to avoid potential failure.
* Add tests for vc-version-diffMatthias Meulien2021-09-051-2/+83
| | | | | | * test/lisp/vc/vc-tests.el (vc-test--version-diff): New function. (vc-test-%s06-version-diff): New family of tests.
* Add diary-offset to diary-lib.elYuchen Pei2021-09-041-0/+7
| | | | | | * doc/emacs/calendar.texi: Document the change. * lisp/calendar/diary-lib.el (diary-offset): * test/lisp/calendar/icalendar-tests.el: Add a test (bug#50195).
* ; Fix typosStefan Kangas2021-09-033-4/+4
|
* Avoid cl-lib alias for cadadr and friendsStefan Kangas2021-09-031-2/+2
| | | | | | | | | | | | | | | | | | * lisp/edmacro.el (edmacro-fix-menu-commands): * lisp/frameset.el (frameset-move-onscreen): * lisp/htmlfontify.el (hfy-face-at, hfy-merge-adjacent-spans) (hfy-mark-tag-names): * lisp/mail/footnote.el (footnote--make-hole) (footnote-back-to-message): * lisp/net/eudc.el (eudc-get-email, eudc-get-phone): * lisp/net/rcirc.el (rcirc-make-trees, rcirc-handler-333) (rcirc-authenticate): * lisp/play/5x5.el (5x5-draw-grid, 5x5-solver): * lisp/play/decipher.el (decipher-insert-frequency-counts): * lisp/ses.el (ses-relocate-range): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-step-into-macro-error) (edebug-tests-error-stepping-into-subr): Avoid using cl-lib aliases for cadadr and friends that now reside in subr.el.
* Move cl-lib tests for caaXr to subr-tests.elStefan Kangas2021-09-032-16/+19
| | | | | | | * test/lisp/emacs-lisp/cl-lib-tests.el (cl-test-caaar) (cl-test-caadr): Move tests using a cl-lib alias from here... * test/lisp/subr-tests.el (subr-test-caaar, subr-test-caadr): ...to here. The functions under test are in subr.el.
* Fix memory-report test failureLars Ingebrigtsen2021-09-031-0/+1
| | | | * test/lisp/emacs-lisp/memory-report-tests.el: Fix test build failure.
* More fixes for recently added vc-rename testGlenn Morris2021-09-021-1/+4
| | | | | * test/lisp/vc/vc-tests.el (vc-test-cvs05-rename-file): Skip. (vc-test-sccs05-rename-file): Treat like RCS.
* memory-report: support calculating size for structuresYikai Zhao2021-09-021-0/+8
| | | | | * lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Add support for cl-defstruct types (bug#50301).
* Add a test for bug#50320 in sh-scriptLars Ingebrigtsen2021-09-021-0/+11
|
* Revert "Tweak sh-script-mode indentation further"Lars Ingebrigtsen2021-09-021-12/+1
| | | | | | This reverts commit 6392bc37ab3b7eb83465d9b2248d21173373ae73. The changes led to errors throughout (bug#50320).
* Add new macro `with-existing-directory'Lars Ingebrigtsen2021-09-011-0/+8
| | | | | * doc/lispref/files.texi (Testing Accessibility): Document it. * lisp/subr.el (with-existing-directory): New macro (bug#32004).
* Fix (setf (map-elt map key) (my-func))Lars Ingebrigtsen2021-09-011-0/+9
| | | | | * lisp/emacs-lisp/map.el (map-elt): Ensure that the value isn't referenced more than once (bug#50290).
* ; cperl-mode.el: Fix border cases of inserting with elispHarald Jörg2021-08-301-6/+52
| | | | | | | | | | | | | * lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Replace (and extend) inline comment by a docstring. Handle edge cases when inserting text with elisp (related to Bug#28962). (cperl-process-here-doc): Add syntax-type `here-doc-start'. (cperl-find-pods-heres): Make sure that the results of this function are immediately visible. * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-14343): Add test cases for "empty" here-documents and inserting at the edges of a here-document.
* (cperl-test-bug-14343): Make it work for perl-modeStefan Monnier2021-08-301-7/+7
| | | | | | | * test/lisp/progmodes/cperl-mode-tests.el (cperl--tests-heredoc-face): New const. (cperl-test-heredocs, cperl-test-bug-14343): Use it. (cperl-test-identify-no-heredoc): Remove left-over message.
* * test/lisp/progmodes/cperl-mode-tests.el: Adjust here-doc tests for perl-modeStefan Monnier2021-08-301-31/+26
| | | | | (cperl-test-identify-heredoc, cperl-test-identify-no-heredoc): Tweak tests so they can also be used for perl-mode.
* Make rfc2368 obsolete and add rfc6068Lars Ingebrigtsen2021-08-302-0/+52
| | | | | | * lisp/obsolete/rfc2368.el: Moved here and made obsolete. * lisp/mail/rfc6068.el (rfc6068-unhexify-string): New file.
* Fix vc test for RCSLars Ingebrigtsen2021-08-291-1/+4
| | | | * test/lisp/vc/vc-tests.el (vc-test--rename-file): Fix test for RCS.
* Tweak sh-script-mode indentation furtherKévin Le Gouguec2021-08-291-1/+12
| | | | | * lisp/progmodes/sh-script.el (sh-smie--default-backward-token): Allow more parentheses in a token (bug#44592).