aboutsummaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for arguments in ALTERNATE_EDITOR to emacsclientReuben Thomas2017-08-071-0/+33
| | | | | | | * lib-src/emacsclient.c (fail): Parse ALTERNATE_EDITOR, or corresponding command-line argument, into space-separated tokens. * etc/NEWS: Document. * test/lib-src/emacsclient-tests.el: Add a test.
* Fix some crashes on self-modifying Elisp codePaul Eggert2017-08-061-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Prompted by a problem report by Alex in: http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00143.html * src/eval.c (For, Fprogn, Fsetq, FletX, eval_sub): Compute XCDR (x) near XCAR (x); although this doesn't fix any bugs, it is likely to run a bit faster with typical hardware caches. (Fif): Use Fcdr instead of XCDR, to avoid crashing on self-modifying S-expressions. (Fsetq, Flet, eval_sub): Count the number of arguments as we go instead of trusting an Flength prepass, to avoid problems when the code is self-modifying. (Fquote, Ffunction, Fdefvar, Fdefconst): Prefer !NILP to CONSP where either will do. This is mostly to document the fact that the value must be a proper list. It's also a tiny bit faster on typical machines nowadays. (Fdefconst, FletX): Prefer XCAR+XCDR to Fcar+Fcdr when either will do. (eval_sub): Check that the args are a list as opposed to some other object that has a length. This prevents e.g. (if . "string") from making Emacs dump core in some cases. * test/src/eval-tests.el (eval-tests--if-dot-string) (eval-tests--let-with-circular-defs, eval-tests--mutating-cond): New tests.
* Minor tweak in a dired testTino Calancha2017-08-061-2/+6
| | | | | * test/lisp/dired-tests.el (dired-test-bug27968): Ensure the new header has different length than the original one.
* Dired w/ eshell-ls: Handle shell wildcards in file nameTino Calancha2017-08-061-0/+18
| | | | | | * lisp/eshell/em-ls.el (eshell-ls--insert-directory): Use eshell-extended-glob (Bug#27844). * test/lisp/dired-tests.el (dired-test-bug27844): Add test.
* dired-revert: save line numbers instead of positionsTino Calancha2017-08-061-0/+46
| | | | | | | | | | | | Positions might change if the length of one dired header line changes; this happen, for instance, if we add new files. Instead, line numbers are invariant under shrinks/enlargements of the file header. https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html * lisp/dired.el (dired-save-positions): Save the line numbers at point. (dired-restore-positions): Use forward-line to restore the original position (Bug#27968). * test/lisp/dired-tests.el (dired-test-bug27968): Add test.
* Fix a bug in 'generate-new-buffer-name'Eli Zaretskii2017-08-051-0/+5
| | | | | | | | | * src/buffer.c (Fgenerate_new_buffer_name): Test IGNORE for being nil before calling string-equal, since the latter will compare "nil and 'nil' as equal. (Bug#27966) * test/src/buffer-tests.el (test-generate-new-buffer-name-bug27966): New test.
* Fix files-tests.el for MS-WindowsEli Zaretskii2017-08-051-4/+5
| | | | | | * test/lisp/files-tests.el (files-tests--file-name-non-special--subprocess): Fix this test for MS-Windows.
* insert-directory-wildcard-in-dir-p: Tweak regexpTino Calancha2017-08-051-0/+18
| | | | | | | This function must return non-nil for a wildcard like '/*/*.txt'. * lisp/files.el (insert-directory-wildcard-in-dir-p): Adjust regexp. * test/lisp/files-tests.el (files-tests--insert-directory-wildcard-in-dir-p): Add test.
* ; Fix map-tests when compiledNoam Postavsky2017-08-041-6/+10
| | | | | | * test/lisp/emacs-lisp/map-tests.el (test-map-elt-testfn) (test-map-put-testfn-alist): Make sure the lookup key is really non-eq to the map's key, even if the code is compiled.
* Fix dired-test-bug27631 on MS-WindowsTino Calancha2017-08-041-0/+4
| | | | | | | | Skip the test if Dired use 'ls' emulation with lisp. The same bug is tested in their respective test suites: ls-lisp-tests.el and em-ls-tests.el. * test/lisp/dired-tests.el (dired-test-bug27631): Skip test if 'ls-lisp' or 'eshell' features are enabled.
* Fix dired-test-bug25609 on MS-WindowsEli Zaretskii2017-08-041-0/+9
| | | | | | * test/lisp/dired-tests.el (dired-test-bug25609): On MS-Windows, pass temporary files through file-truename, to avoid bogus failures due to file-name comparison as strings.
* Fix 2 tests that fail in MS-WindowsTino Calancha2017-08-042-24/+49
| | | | | | | | | | | | | | | https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): Add comments to explain the test logic. Pass '--binary' option to 'patch' program in windows environments. Check explicitely that a backup is created before compare file contents. * test/lisp/dired-tests.el (dired-test-bug25609): Declare variable 'dired-dwim-target' right before the test. Add comments to explain the test logic. Ensure, before test the bug condition, that we are displaying the 2 dired buffers created in this test, and no other dired buffer is shown.
* Add debugging messages to a Dired testStephen Berman2017-08-021-2/+10
| | | | | | * test/lisp/dired-tests.el (dired-test-bug27243-01): Log positions saved and restored by dired-revert to try and find out why the test fails on Hydra.
* ; Extend traces in tramp-test36-asynchronous-requests for hydraMichael Albinus2017-08-021-5/+5
|
* dired-align-file: Inherit text properties in inserted spacesTino Calancha2017-08-021-0/+15
| | | | | | * lisp/dired.el (dired-align-file): Inherit text properties in inserted spaces (Bug#27899). * test/lisp/dired-tests.el (dired-test-bug27899): Add test.
* Move dired tests using ls emulation to different filesTino Calancha2017-08-023-92/+140
| | | | | | | | | | | | | | | | | Suggested in: https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html * test/lisp/dired-tests.el (dired-test-bug27693) (dired-test-bug27762, dired-test-bug27817) (dired-test-bug27631, dired-test-bug27843): Delete those parts requiring either ls-lisp or eshell-ls. * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27762) (ls-lisp-test-bug27631, ls-lisp-test-bug27693): Add all dired tests using ls-lisp here. * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631) (em-ls-test-bug27817, em-ls-test-bug27843): New test file. Add all dired tests using eshell-ls here.
* * test/lisp/ls-lisp-tests.el: Rename it from ls-lisp.elTino Calancha2017-08-021-0/+0
|
* Fix misalignment in Dired when dired-directory is a consTino Calancha2017-08-021-1/+0
| | | | | | | | * lisp/dired.el (dired--need-align-p, dired--align-all-files): New defuns. (dired-internal-noselect): Call dired--align-all-files when dired-directory is a cons (Bug#27762). * test/lisp/dired-tests.el (dired-test-bug27762): Test should pass.
* Fix some dired-tests.el on MS-WindowsEli Zaretskii2017-08-011-0/+10
| | | | | | | * test/lisp/dired-tests.el (dired-test-bug27243-01) (dired-test-bug27243-02): On MS-Windows, pass test-dir through file-truename, to avoid bogus failures due to file-name comparison as strings.
* Insert subdir content if dir-or-list is a string w/o wildcardsTino Calancha2017-08-011-0/+15
| | | | | | | * lisp/eshell/em-ls.el (eshell-ls--insert-directory): Append '("-d") into 'eshell-ls-dired-initial-args' if 'dired-directory' is a cons or there are wildcars (Bug#27843). * test/lisp/dired-tests.el (dired-test-bug27843): Add test.
* Add more should form calls in a failing dired testTino Calancha2017-08-011-4/+10
| | | | | | | | | Some dired tests fail intermittently in hydra. Add few more should form calls for debugging. See: https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html * test/lisp/dired-tests.el (dired-test-bug27243-01): Add few more should forms for debugging.
* dired-tests: Unload tested features after test themTino Calancha2017-07-311-1/+6
| | | | | | | | | | | | Some tests are for Dired with ls-lisp or eshell-ls. Requiring these features add an advice on `dired' and might affect other tests. Do not require these features at the top of the file; require then inside the tests and unload then at the end. * test/lisp/dired-tests.el (dired-test-bug27693) (dired-test-bug7131, dired-test-bug27817, dired-test-bug27631): require ls-lisp and/or eshell-ls inside the test; unload the features at the end.
* Small adaptions for directory wildcardsMichael Albinus2017-07-311-5/+10
| | | | | | | | | | * lisp/dired.el (dired-insert-directory): Remove "--dired" when there are wildcards, and the directory is remote. * test/lisp/net/tramp-tests.el (tramp--test-make-temp-name): Adapt docstring. (tramp-test17-dired-with-wildcards): Skip for all methods but those from tamp-sh.p.
* ; Change instrumentation code in tramp-tests.elMichael Albinus2017-07-311-13/+4
|
* * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards): New test.Michael Albinus2017-07-301-1/+103
|
* Dired: Handle posix wildcards in directory partTino Calancha2017-07-301-0/+38
| | | | | | | | | | | | | | | | | | | | | | Allow Dired to handle calls like \(dired \"~/foo/*/*.el\"), that is, with wildcards within the directory part of the file argument (Bug#27631). * lisp/files.el (insert-directory-wildcard-in-dir-p): New predicate. (insert-directory-clean): New defun extracted from insert-directory. (insert-directory) * lisp/dired.el (dired-internal-noselect) (dired-insert-directory): Use the new predicate; when it's true, handle the directory wildcards with a shell call. * lisp/eshell/em-ls.el (eshell-ls-use-in-dired): Add/remove both advices. (eshell-ls-unload-hook): New defun. Use it in eshell-ls-unload-hook instead of an anonymous function. (eshell-ls--dired) * lisp/ls-lisp.el (ls-lisp--dired): Advice dired to handle wildcards in the directory part with both eshell-ls and ls-lisp. * etc/NEWS: Announce it. * doc/emacs/dired.texi (Dired Enter): Update manual. * test/lisp/dired-tests.el (dired-test-bug27631): Add test.
* Preserve point under 'dired-auto-revert-buffer' (third case)Stephen Berman2017-07-291-5/+94
| | | | | | | | | | | | | | | * lisp/files.el (find-file): Use pop-to-buffer-same-window instead of switch-to-buffer. This preserves Dired window point when dired-auto-revert-buffer is non-nil. (Bug#27243) * test/lisp/dired-tests.el (dired-test-bug27243-01) (dired-test-bug27243-02, dired-test-bug27243-03): New tests. The first two replace a previous test that combined them; that test intermittently fails in the Hydra build system, so maybe separating the two cases will help locate the point of failure. The third test involves find-file but is here because it, like the others, is testing the effect of dired-auto-revert-buffer.
* * lisp/password-cache.el (password-data): Use a hash-tableStefan Monnier2017-07-281-1/+1
| | | | | | | | | | | | * lisp/auth-source.el (auth-source-magic): Remove. (auth-source-forget+, auth-source-forget-all-cached): Adjust to new format of password-data. (auth-source-format-cache-entry): Just use a cons. (password-cache-remove, password-cache-add, password-reset) (password-read-from-cache, password-in-cache-p): Adjust accordingly. Fixes: bug#26699
* * lisp/subr.el (define-symbol-prop): New functionStefan Monnier2017-07-281-1/+1
| | | | | | | | (symbol-file): Make it find symbol property definitions. * lisp/emacs-lisp/pcase.el (pcase-defmacro): * lisp/emacs-lisp/ert.el (ert-set-test): Use it instead of `put'. (ert-describe-test): Adjust call to symbol-file accordingly.
* * lisp/subr.el (method-files): Move function to cl-generic.elStefan Monnier2017-07-282-25/+24
| | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-generic-p): New function. (cl--generic-method-files): New function, moved from subr.el. * lisp/emacs-lisp/edebug.el (edebug-instrument-function): Use them. * test/lisp/emacs-lisp/cl-generic-tests.el: * test/lisp/subr-tests.el: Move and adjust method-files tests accordingly.
* Add watchdog process to tramp-test36-asynchronous-requestsMichael Albinus2017-07-271-6/+18
| | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): New defun. (tramp-test36-asynchronous-requests): Use a watchdog process, listening for SIGUSR1.
* Dired: Support eshell-ls from the beginning if the user wants toTino Calancha2017-07-261-0/+13
| | | | | | * lisp/dired.el (dired-insert-directory): Check for eshell-ls as well (Bug#27817). * test/lisp/dired-tests.el (dired-test-bug27817): Add test.
* ; Instrument entry of tramp--test-instrument-test-caseMichael Albinus2017-07-251-2/+3
|
* ls-lisp: Add an unload function and enable lexical bindingTino Calancha2017-07-251-0/+37
| | | | | | Enable lexical binding. * lisp/ls-lisp.el (ls-lisp-unload-function): New defun. * test/lisp/ls-lisp.el (ls-lisp-unload): Add test.
* register-read-with-preview: Quit if user input C-g or ESCTino Calancha2017-07-251-0/+43
| | | | | | | * lisp/register.el (register-read-with-preview): Quit if user input C-g or ESC (bug#27634). * doc/emacs/regs.texi (Registers): Update manual. * test/lisp/register-tests.el (register-test-bug27634): Add test.
* * lisp/progmodes/perl-mode.el: Add support for indented here docsStefan Monnier2017-07-241-0/+8
| | | | | | | | | * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Recognize the new <<~ syntax for indented here docs. (perl-syntax-propertize-special-constructs): Adjust search of the end of here docs accordingly. * test/manual/indent/perl.perl: Add test for indented here docs.
* Fix Bug#27371Michael Albinus2017-07-241-0/+8
| | | | | | | | | | | | * lisp/loadhist.el (loadhist-unload-element): Declare for different entry types of `load-history'. (loadhist--restore-autoload): New variable. (loadhist--unload-function): New defun. (unload-feature): Use `loadhist-unload-element'. Recommended by Stefan Monnier. (Bug#27371) * test/lisp/net/tramp-tests.el (tramp-test39-unload): Check, that the `tramp-file-name' structure has been unloaded.
* ; Don't keep temporary buffers alive after a dired testTino Calancha2017-07-241-11/+18
| | | | | | * test/lisp/dired-tests.el (dired-test-bug22694) (dired-test-bug25609, dired-test-bug27243) Delete all temporary dired buffers at the end.
* Add 'rx' pattern for pcase.Philipp Stephani2017-07-231-0/+10
| | | | | * lisp/emacs-lisp/rx.el (rx): New pcase macro. * test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add unit test.
* Signal error for symbol names with strange quotes (Bug#2967)Noam Postavsky2017-07-221-0/+17
| | | | | | | | * src/lread.c (read1): Signal an error when a symbol starts with a non-escaped quote-like character. * test/src/lread-tests.el (lread-tests--funny-quote-symbols): New test. * etc/NEWS: Announce change.
* * test/lisp/ibuffer-tests.el: Delete temporary files.Glenn Morris2017-07-211-0/+4
|
* Further attempt to avoid hang in network-stream-testsGlenn Morris2017-07-211-2/+5
| | | | | * test/lisp/net/network-stream-tests.el (connect-to-tls-ipv6-nowait): Limit the time we wait for the external process.
* Stop skipping many ibuffer tests by defaultGlenn Morris2017-07-211-15/+15
| | | | | | | | | | | | * test/lisp/ibuffer-tests.el (ibuffer-0autoload): Rename so it sorts first. (ibuffer-save-filters, ibuffer-filter-inclusion-1) (ibuffer-filter-inclusion-2, ibuffer-filter-inclusion-3) (ibuffer-filter-inclusion-4, ibuffer-filter-inclusion-5) (ibuffer-filter-inclusion-6, ibuffer-filter-inclusion-7) (ibuffer-filter-inclusion-8, ibuffer-decompose-filter) (ibuffer-and-filter, ibuffer-or-filter, ibuffer-format-qualifier) (ibuffer-unary-operand): Require ibuf-ext so tests not skipped.
* dired: Revert buffer when DIRNAME is a consTino Calancha2017-07-211-1/+0
| | | | | | | * lisp/dired.el (dired-internal-noselect): Revert buffer if DIR-OR-LIST is a cons, or dired-directory is a cons and DIR-OR-LIST a string (Bug#7131). Update the comments. * test/lisp/dired-tests.el (dired-test-bug7131): Test should pass.
* ; Spelling fixesPaul Eggert2017-07-202-3/+3
|
* Add test for bugs 7131, 27762Tino Calancha2017-07-191-10/+53
| | | | | | | Require 'ls-lisp' at top of the file. * test/lisp/dired-tests.el (dired-test-bug7131, dired-test-bug27762): New tests. (dired-test-bug27693): Delete Dired buffer at the end.
* Use a more specific test for running on hydra.nixos.orgGlenn Morris2017-07-185-8/+8
| | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): * test/Makefile.in (WRITE_LOG): * test/lisp/filenotify-tests.el: * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el (eieio-test-method-order-list-6): * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-37-obsolete-name-in-constructor): * test/lisp/net/tramp-tests.el: Replace NIX_STORE with EMACS_HYDRA_CI.
* ; Add further traces to tramp-tests.elMichael Albinus2017-07-181-3/+4
|
* Fix relocation with named cell referred to by a one-symbol formula.Vincent Belaïche2017-07-171-0/+22
| | | | | | | | | * lisp/ses.el (ses-replace-name-in-formula): Fix bug for it to work also with one symbol formulas. * test/lisp/ses-tests.el (ses-tests-renaming-cell-with-one-symbol-formula): Add new test for renaming with relocating a one symbol formula.
* alist-get: Add optional arg TESTFNTino Calancha2017-07-171-0/+12
| | | | | | | | | | | | If TESTFN is non-nil, then it is the predicate to lookup the alist. Otherwise, use 'eq' (Bug#27584). * lisp/subr.el (alist-get): Add optional arg FULL. * lisp/emacs-lisp/map.el (map-elt, map-put): Add optional arg TESTFN. * lisp/emacs-lisp/gv.el (alist-get): Update expander. * doc/lispref/lists.texi (Association Lists): Update manual. * etc/NEWS: Announce the changes. * test/lisp/emacs-lisp/map-tests.el (test-map-put-testfn-alist) (test-map-elt-testfn): New tests.