aboutsummaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix print.c infloop on circular listsPaul Eggert2019-10-301-1/+5
| | | | | | | | | | | | | | Fix infinite loops in print.c when a circular list is passed to command-error-default-function or to error-message-string. * src/print.c (print_error_message): Use FOR_EACH_TAIL to avoid infloop on circular lists. (print_object): Use FOR_EACH_TAIL_SAFE, as it uses Brent’s teleporting tortoise-hare algorithm which is asymptotically better than the classic tortoise-hare algorithm that the code wsas using. * test/src/print-tests.el (print-circle-2): When print-circle is nil, do not insist on a particular cycle-detection heuristic. (error-message-string-circular): New test.
* Fix fileio.c infloops on circular listsPaul Eggert2019-10-301-0/+9
| | | | | | | | | | | | | Fix infinite loops in fileio.c when a circular list is the value of after_insert_file_functions, buffer-auto-save-file-format, buffer-file-format, or write-region-annotate-functions. * src/fileio.c (Finsert_file_contents, build_annotations): Use FOR_EACH_TAIL to avoid infloop on circular lists. (build_annotations): Use an EMACS_INT, not an int, to count nesting level. * test/src/fileio-tests.el: (fileio-tests--circular-after-insert-file-functions): New test.
* Add gradle-kotlin to compilation-error-regexp-alist-alistFilipp Gunbin2019-10-291-2/+9
| | | | | | * lisp/progmodes/compile.el: Add gradle-kotlin to compilation-error-regexp-alist-alist. * etc/compilation.txt: Add samples for it.
* * test/lisp/cedet/semantic-utest: silence compiler warningsEric Ludlam2019-10-272-28/+4
| | | | | | | | | | * test/lisp/cedet/semantic-utest-c.el (semantic-test-c-preprocessor-simulation): Use with-current-buffer. * test/lisp/cedet/semantic-utest.el (semantic-utest-makebuffer): Use read-only-mode. (semantic-utest-verify-names-jave, semantic-utest-verify-names-2): Remove functions, unused.
* time-stamp-time-zone: update customizationStephen Gildea2019-10-271-0/+19
| | | | | | | | | | | * time-stamp.el (time-stamp-time-zone): Support customization with an integer offset (a new possible value of the ZONE argument to format-time-string in Emacs 27). Update the safe-local-variable predicate from string-or-null-p (describing time-stamp-time-zone's domain before 2015) to new predicate time-stamp-zone-type-p (describing the current domain). * time-stamp-tests.el (time-stamp-test-helper-zone-type-p): New test.
* Expand rx definitions inside (not ...)Mattias Engdegård2019-10-271-1/+16
| | | | | | | | | * lisp/emacs-lisp/rx.el (rx--translate-not): * test/lisp/emacs-lisp/rx-tests.el (rx-not, rx-def-in-not): * doc/lispref/searching.texi (Rx Constructs, Extending Rx): Allow user-defined rx constructs to be expanded inside (not ...) forms, for better composability (bug#37849).
* Some Tramp trace improvementsMichael Albinus2019-10-271-1/+1
| | | | | | | * lisp/net/tramp.el (tramp-call-process): `result' can also be nil. * test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Improve trace format.
* dired-dwim-target uses most recently visited window instead of next window.Juri Linkov2019-10-271-2/+1
| | | | | | | | | | | | | * doc/emacs/dired.texi (Operating on Files): Document behavior change. * lisp/dired-aux.el (dired-dwim-target-directories): New function. (dired-dwim-target-directory, dired-dwim-target-defaults): Use it to get the most recently used window instead of the next window (bug#35385). * lisp/dired.el (dired-dwim-target): Doc fix. * test/lisp/dired-tests.el: Remove unnecessary require and pacify byte-compiler.
* time-stamp-tests: add name prefix to tests of formattingStephen Gildea2019-10-261-17/+17
| | | | | | * time-stamp-tests.el: rename all the time-stamp-string formatting tests to have the word "format" in their name, to make room in the namespace for other, future tests.
* time-stamp-tests: consistently name the time varsStephen Gildea2019-10-251-95/+97
| | | | | * time-stamp-tests.el (with-time-stamp-test-env): rename local variable 'ref-time' to 'ref-time1', for parallelism with ref-time2 and ref-time3.
* Set expected result for a cedet testGlenn Morris2019-10-221-1/+2
| | | | | * test/lisp/cedet/srecode-utest-template.el (srecode-utest-project): Test fails on hydra.nixos.org, for some reason.
* Don't try to add nil packages on refreshStefan Kangas2019-10-212-0/+18
| | | | | | | | | * lisp/emacs-lisp/package.el (package-read-archive-contents): Don't try to add nil entries. Warn instead. (Bug#28502) * test/lisp/emacs-lisp/package-tests.el (package-test-update-archives/ignore-nil-entry): New test. * test/lisp/emacs-lisp/package-resources/with-nil-entry/archive-contents: New file.
* * test/lisp/net/tramp-tests.el (remote-file-name-inhibit-cache): Set to nil.Michael Albinus2019-10-181-2/+3
|
* Use [^z-a] for matching any character (anychar/anything) in rxMattias Engdegård2019-10-181-3/+3
| | | | | | | | | | * lisp/emacs-lisp/rx.el (rx--translate-symbol): * test/lisp/emacs-lisp/rx-tests.el (rx-any, rx-atoms): Use [^z-a] instead of ".\\|\n" for anychar. The new expression is faster (about 2×) and does not allocate regexp stack space. For example, (0+ anychar) now matches strings of any size (bug#37659).
* Add `unmatchable' as alias for (or) in rx (bug#37659)Mattias Engdegård2019-10-181-0/+2
| | | | | | | | | * lisp/emacs-lisp/rx.el (rx--translate-symbol, rx--builtin-symbols, rx): * test/lisp/emacs-lisp/rx-tests.el (rx-atoms): * doc/lispref/searching.texi (Rx Constructs): * etc/NEWS: Add `unmatchable', more descriptive than (or), and corresponding to the variable `regexp-unmatchable'.
* Add `anychar' as alias to `anything' in rx (bug#37659)Mattias Engdegård2019-10-181-2/+2
| | | | | | | | | * lisp/emacs-lisp/rx.el (rx--translate-symbol, rx--builtin-symbols, rx): * test/lisp/emacs-lisp/rx-tests.el (rx-atoms): * doc/lispref/searching.texi (Rx Constructs): * etc/NEWS: Add `anychar', an alias for `anything'. Since `anychar' is more descriptive (and slightly shorter), treat it as the preferred name.
* Fix test data broken by removing trailing whitespace.Eric Ludlam2019-10-151-4/+2
|
* Adapt the CEDET SRecoder getset tests to use ERTEric Ludlam2019-10-151-0/+177
| | | | | These tests were copied from CEDET from SourceForge. Author: Eric Ludlam <zappo@gnu.org>
* Adapt the CEDET SRecoder template test to use ERTEric Ludlam2019-10-151-0/+379
| | | | | These tests were copied from CEDET from SourceForge. Author: Eric Ludlam <zappo@gnu.org>
* Copy CEDET/Semantic's tag formatter test suite to be anEric Ludlam2019-10-153-0/+302
| | | | | | automated test. These tests were copied from CEDET on Sourceforge and adapted to use ERT. Author: Eric Ludlam <zappo@gnu.org>
* Update CEDET manual tests so that they run.Eric Ludlam2019-10-153-24/+51
| | | | | | | To run visit test/manual/cedet/cedet-utests.el M-x eval-buffer M-x cedet-utest Author: Eric Ludlam <zappo@gnu.org>
* Convert manual CEDET tests from test/manual/cedet to beEric Ludlam2019-10-154-422/+370
| | | | | automated tests in test/lisp/cedet. Author: Eric Ludlam <zappo@gnu.org>
* Correctly explain test failures with mixed uni/multibyte stringsMattias Engdegård2019-10-131-0/+23
| | | | | | | | | * lisp/emacs-lisp/ert.el (ert--explain-equal-rec): * test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-equal): When explaining a difference between a unibyte and a multibyte string, first convert both to multibyte. Otherwise, we might end up comparing unibyte char C to multibyte char C, 127<C<256, and not detect the difference (bug#30219).
* Minor tweaks to time-stamp documentation stringsStephen Gildea2019-10-131-1/+1
| | | | | | | | | | * time-stamp.el (time-stamp): Reformat the explanation of the variables that affect time-stamp, for easier reading. In particular, wrap the documentation to 75 characters, so that it displays neatly as a before-save-hook customization option. * time-stamp-tests.el (with-time-stamp-test-env): Use imperative voice, per checkdoc.
* Adapt some Tramp testsMichael Albinus2019-10-122-11/+15
| | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test17-insert-directory): Adapt regexp of summary line. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test for symlinked directories.
* * lisp/emacs-lisp/map.el (map-into) <hash-table>: Allow keyword argsAndrea Corallo2019-10-111-1/+4
| | | | | | | | (map--into-hash): New function, extracted from `map-into <hash-table>`. Speed it up a bit by using gethash instead of map-elt when we know we're accessing a hash table. * test/lisp/emacs-lisp/map-tests.el (test-map-into): Add corresponding test.
* Remove two checkdoc tests checked in by mistakeLars Ingebrigtsen2019-10-111-16/+0
| | | | | * test/lisp/emacs-lisp/checkdoc-tests.el: Remove &aux and &context checks mistakenly checked in (as these aren't implemented) (bug#37697).
* Port time-stamp-test-time-zone to macOSPaul Eggert2019-10-101-6/+8
| | | | | | | Problem reported by Stefan Kangas in: https://lists.gnu.org/r/emacs-devel/2019-10/msg00360.html * test/lisp/time-stamp-tests.el (time-stamp-test-time-zone): Don’t assume (format-time-string "%Z" 0 t) returns "GMT".
* checkdoc CL testsDamien Cassou2019-10-101-0/+106
| | | | | * test/lisp/emacs-lisp/checkdoc-tests.el: Add cl-lib-related tests (bug#37063).
* Fix formatting of (file-size-human-readable 2047)Lars Ingebrigtsen2019-10-101-0/+6
| | | | | * lisp/files.el (file-size-human-readable): Don't format slightly-less numbers as X.0k, but just Xk instead (bug#36329).
* time-stamp: revert recent change to "%04y"Stephen Gildea2019-10-091-3/+5
| | | | | | | | | | * time-stamp.el (time-stamp-string-preprocess): Revert change to "%04y" format made 2 weeks ago by commit 0e56883878 (the previous commit to this file). Although undocumented, "%04y" was discovered to be in use in the wild (2016) and had not issued a warning that it would change. Add a warning that it will change. * time-stamp-tests.el (time-stamp-test-year-2digit): add test of "%04y"
* Expand testing of time-stamp format "%y"Stephen Gildea2019-10-091-12/+26
| | | | | | | * time-stamp-tests.el (time-stamp-test-year): break into two tests, time-stamp-test-year-2digit and time-stamp-test-year-4digit. Expand time-stamp-test-year-2digit to look more like tests for other 2-digit conversions.
* Filter packages by name in list-packages. (Bug#36981)Federico Tedin2019-10-081-0/+22
| | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-menu-filter-by-name): New function to filter packages by name. (package-menu-clear-filter): New function to clear applied filters. (package-menu-filter-by-keyword): Rename function from package-menu-filter. (package-menu--generate): Don't change 'q' binding anymore. (package-menu-mode-map): Bind '/ n' to package-menu-filter-by-name, '/ k' to package-menu-filter-by-keyword and '/ /' to package-menu-clear-filter. (package-menu-mode-menu): Update menu entries for the three functions. * test/lisp/emacs-lisp/package-tests.el (package-test-list-filter-by-name) (package-test-list-clear-filter): New tests. * doc/emacs/package.texi: Document usage of package-menu-filter-by-name, package-menu-clear-filter and update reference to package-menu-filter-by-keyword. * etc/NEWS: Announce changes.
* * lisp/emacs-lisp/package.el (package--get-deps): Fix thinkoStefan Monnier2019-10-081-17/+8
| | | | | * test/lisp/emacs-lisp/package-tests.el (package-test-get-deps): Adjust test to new calling convention.
* Add "python3 -m twine" example to comint-password-prompt testsStefan Kangas2019-10-071-0/+1
| | | | | * test/lisp/comint-tests.el (comint-testsuite-password-strings): Add new example for "python3 -m twine" to test suite. (Bug#37636)
* Fix off-by-one bug in ISO 8601 BC yearsPaul Eggert2019-10-051-1/+1
| | | | | | | | | | | | | | | | * lisp/calendar/iso8601.el (iso8601--year-match) (iso8601--full-date-match, iso8601--without-day-match) (iso8601--week-date-match, iso8601--ordinal-date-match) (iso8601-parse-date): Don’t bother to separate the year’s sign from the year, as that distinction is not needed: ISO 8601 uses astronomical year numbering with a year zero, which is what the Emacs time functions use, so there’s no need to treat nonpositive years specially. (iso8601--adjust-year): Remove; no longer needed since callers can just use string-to-number. * test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years): Adjust test case to match fixed behavior.
* Support GNU make error messages in compile mode.Paul Smith2019-10-051-1/+7
| | | | | | | | * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Match GNU make error messages. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): Test GNU make error message matching. (compile-test-error-regexps): Update count of infos found.
* Remove some XEmacs compat code from the CEDET testsLars Ingebrigtsen2019-10-052-16/+13
|
* Add tests for secure-hash and improve doc string (Bug#37420)Stefan Kangas2019-10-041-0/+18
| | | | | | * src/fns.c (Fsecure_hash_algorithms): Fix typo. (Fsecure_hash): Add algorithm list to doc string. * test/src/fns-tests.el (test-secure-hash): New test.
* Fix error in gnu compilation-mode regexp (bug#37582)Mattias Engdegård2019-10-041-1/+3
| | | | | | | | * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Fix a mistake introduced when the regexp was translated to rx. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data) (compile-test-error-regexps): Add test case. * etc/compilation.txt: Add example.
* Make compile-tests re-runnableMattias Engdegård2019-10-041-5/+8
| | | | | | | * test/lisp/progmodes/compile-tests.el (compile-test-error-regexps): Don't rely on compilation-num-errors (etc) all being zero, which they aren't if the test has been run before. (compile-tests--test-regexps-data): Change defvar to defconst.
* More doc fixes in package.el (Bug#37544)Stefan Kangas2019-10-041-1/+6
| | | | | | | | | | | * lisp/emacs-lisp/package.el (package-menu-hide-low-priority) (package-pinned-packages, package-load-descriptor) package-archive-version, package-archive-contents) package--read-archive-file, package-read-archive-contents) (package-unsigned-archives, package-read-all-archive-contents) (package--download-and-read-archives, package-install): * lisp/subr.el (package--description-file): * test/lisp/emacs-lisp/package-tests.el: Doc fixes.
* Further improve button.el support for help-echoBasil L. Contovounesios2019-10-031-0/+56
| | | | | | | | | | | | | | The last change to forward-button added support for help-echo values that are functions. This patch fixes the arguments passed to such functions and further adds support for help-echo values that are forms (bug#37515). * doc/lispref/display.texi (Button Properties): Fix description of help-echo button property. * lisp/button.el (button--help-echo): New function. (forward-button): Use it. (backward-button): Clarify help-echo reference in docstring. * test/lisp/button-tests.el (button--help-echo-string) (button--help-echo-form, button--help-echo-function): New tests.
* Fix typo in last commitMichael Albinus2019-10-031-1/+1
|
* Further adaptions for shadowfile-tests.elMichael Albinus2019-10-031-10/+15
| | | | | | | * test/lisp/shadowfile-tests.el: Change some traces. (shadow-test-remote-temporary-file-directory): Adapt also remote home directory. (shadow--tests-cleanup): Cleanup Tramp.
* Update a substitute-command-keys testGlenn Morris2019-10-011-0/+1
| | | | | * test/src/doc-tests.el (doc-test-substitute-command-keys): Update for recent minibuffer map change.
* Move undocumented time-stamp formats closer to format-time-stringStephen Gildea2019-09-301-54/+73
| | | | | | | | | * time-stamp.el (time-stamp-string-preprocess): Update some undocumented formatting characters of time-stamp format for closer (still incomplete) alignment with format-time-string. They have displayed a warning since Emacs 20 (released in 1997), so it is unlikely anyone is using them. * time-stamp-tests.el: Update tests to match new expectations.
* time-stamp doc: recommend formats closer to format-time-stringStephen Gildea2019-09-301-19/+23
| | | | | | | | | | * time-stamp.el (time-stamp-format, time-stamp-pattern): Update recommended (documented) formats. No code changes, just documentation. All recommended formats are compatible at least as far back as Emacs 22.1 (released in 2007) and are now closer to compatibility with format-time-string. * time-stamp-tests.el: Update test comments to match.
* Update iso8601-tests for new interfaceLars Ingebrigtsen2019-09-291-7/+7
|
* Add support for sub-second ISO8601 stringsLars Ingebrigtsen2019-09-291-19/+19
| | | | | * lisp/calendar/iso8601.el (iso8601--decimalize): New function. (iso8601-parse-time): Support sub-second ISO8601 times.