1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-15 09:47:20 +00:00
Commit Graph

93 Commits

Author SHA1 Message Date
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Glenn Morris
73b2f7ac69 Tiny ert-summarize-tests-batch-and-exit improvement
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Report the details of unexpected passes as well as failures.
2018-12-17 22:52:34 -08:00
Michael Heerdegen
1808d254a5 Replace insignificant backquotes
Replace most insignificant occurrences of '`' with a straight quote,
sharp quote or nothing.  This includes backquotes in 'pcase' patterns.

* admin/admin.el:
* lisp/apropos.el:
* lisp/arc-mode.el:
* lisp/auth-source.el:
* lisp/avoid.el:
* lisp/bindings.el:
* lisp/bs.el:
* lisp/calculator.el:
* lisp/calendar/todo-mode.el:
* lisp/cedet/semantic.el:
* lisp/cedet/semantic/analyze/debug.el:
* lisp/cedet/semantic/bovine.el:
* lisp/cedet/semantic/dep.el:
* lisp/cedet/semantic/grammar.el:
* lisp/cedet/semantic/wisent/comp.el:
* lisp/cedet/semantic/wisent/grammar.el:
* lisp/cedet/srecode/mode.el:
* lisp/cus-edit.el:
* lisp/doc-view.el:
* lisp/elec-pair.el:
* lisp/electric.el:
* lisp/emacs-lisp/autoload.el:
* lisp/emacs-lisp/benchmark.el:
* lisp/emacs-lisp/byte-opt.el:
* lisp/emacs-lisp/bytecomp.el:
* lisp/emacs-lisp/cconv.el:
* lisp/emacs-lisp/cl-extra.el:
* lisp/emacs-lisp/cl-generic.el:
* lisp/emacs-lisp/cl-macs.el:
* lisp/emacs-lisp/copyright.el:
* lisp/emacs-lisp/debug.el:
* lisp/emacs-lisp/eieio-compat.el:
* lisp/emacs-lisp/ert.el:
* lisp/emacs-lisp/generator.el:
* lisp/emacs-lisp/inline.el:
* lisp/emacs-lisp/macroexp.el:
* lisp/emacs-lisp/map.el:
* lisp/emacs-lisp/package-x.el:
* lisp/emacs-lisp/package.el:
* lisp/emacs-lisp/radix-tree.el:
* lisp/emacs-lisp/smie.el:
* lisp/epa.el:
* lisp/erc/erc-dcc.el:
* lisp/erc/erc-track.el:
* lisp/erc/erc.el:
* lisp/eshell/em-ls.el:
* lisp/eshell/esh-cmd.el:
* lisp/files.el:
* lisp/filesets.el:
* lisp/font-lock.el:
* lisp/frameset.el:
* lisp/gnus/gnus-agent.el:
* lisp/gnus/gnus-art.el:
* lisp/gnus/gnus-cite.el:
* lisp/gnus/gnus-group.el:
* lisp/gnus/gnus-msg.el:
* lisp/gnus/gnus-salt.el:
* lisp/gnus/gnus-srvr.el:
* lisp/gnus/gnus-sum.el:
* lisp/gnus/gnus-topic.el:
* lisp/gnus/gnus-util.el:
* lisp/gnus/gnus.el:
* lisp/gnus/message.el:
* lisp/gnus/mm-util.el:
* lisp/gnus/mml.el:
* lisp/gnus/nnheader.el:
* lisp/gnus/nnimap.el:
* lisp/gnus/nnmairix.el:
* lisp/gnus/spam.el:
* lisp/hexl.el:
* lisp/hi-lock.el:
* lisp/ibuf-ext.el:
* lisp/ibuffer.el:
* lisp/ido.el:
* lisp/info.el:
* lisp/international/mule-cmds.el:
* lisp/international/mule-util.el:
* lisp/json.el:
* lisp/jsonrpc.el:
* lisp/language/cyrillic.el:
* lisp/language/european.el:
* lisp/language/georgian.el:
* lisp/language/tibetan.el:
* lisp/language/utf-8-lang.el:
* lisp/language/vietnamese.el:
* lisp/ldefs-boot.el:
* lisp/mail/mail-extr.el:
* lisp/man.el:
* lisp/menu-bar.el:
* lisp/mh-e/mh-acros.el:
* lisp/mh-e/mh-folder.el:
* lisp/mh-e/mh-mime.el:
* lisp/mh-e/mh-show.el:
* lisp/mh-e/mh-speed.el:
* lisp/minibuffer.el:
* lisp/mpc.el:
* lisp/net/ange-ftp.el:
* lisp/net/hmac-def.el:
* lisp/net/newst-backend.el:
* lisp/net/quickurl.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-compat.el:
* lisp/notifications.el:
* lisp/obsolete/pgg-parse.el:
* lisp/obsolete/vc-arch.el:
* lisp/obsolete/xesam.el:
* lisp/org/ob-C.el:
* lisp/org/ob-core.el:
* lisp/org/ob-exp.el:
* lisp/org/ob-groovy.el:
* lisp/org/ob-haskell.el:
* lisp/org/ob-io.el:
* lisp/org/ob-lisp.el:
* lisp/org/ob-lob.el:
* lisp/org/ob-lua.el:
* lisp/org/ob-octave.el:
* lisp/org/ob-perl.el:
* lisp/org/ob-python.el:
* lisp/org/ob-ref.el:
* lisp/org/ob-ruby.el:
* lisp/org/ob-sql.el:
* lisp/org/org-agenda.el:
* lisp/org/org-capture.el:
* lisp/org/org-clock.el:
* lisp/org/org-colview.el:
* lisp/org/org-duration.el:
* lisp/org/org-element.el:
* lisp/org/org-entities.el:
* lisp/org/org-gnus.el:
* lisp/org/org-indent.el:
* lisp/org/org-info.el:
* lisp/org/org-inlinetask.el:
* lisp/org/org-lint.el:
* lisp/org/org-list.el:
* lisp/org/org-mouse.el:
* lisp/org/org-plot.el:
* lisp/org/org-src.el:
* lisp/org/org-table.el:
* lisp/org/org.el:
* lisp/org/ox-ascii.el:
* lisp/org/ox-html.el:
* lisp/org/ox-latex.el:
* lisp/org/ox-man.el:
* lisp/org/ox-md.el:
* lisp/org/ox-org.el:
* lisp/org/ox-publish.el:
* lisp/org/ox-texinfo.el:
* lisp/org/ox.el:
* lisp/play/bubbles.el:
* lisp/play/gamegrid.el:
* lisp/progmodes/autoconf.el:
* lisp/progmodes/cc-defs.el:
* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cc-fonts.el:
* lisp/progmodes/cc-langs.el:
* lisp/progmodes/cperl-mode.el:
* lisp/progmodes/ebrowse.el:
* lisp/progmodes/elisp-mode.el:
* lisp/progmodes/flymake-cc.el:
* lisp/progmodes/flymake.el:
* lisp/progmodes/fortran.el:
* lisp/progmodes/grep.el:
* lisp/progmodes/gud.el:
* lisp/progmodes/idlwave.el:
* lisp/progmodes/js.el:
* lisp/progmodes/m4-mode.el:
* lisp/progmodes/make-mode.el:
* lisp/progmodes/mixal-mode.el:
* lisp/progmodes/modula2.el:
* lisp/progmodes/octave.el:
* lisp/progmodes/opascal.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ps-mode.el:
* lisp/progmodes/python.el:
* lisp/progmodes/ruby-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/progmodes/sql.el:
* lisp/progmodes/verilog-mode.el:
* lisp/ps-mule.el:
* lisp/rtree.el:
* lisp/ruler-mode.el:
* lisp/ses.el:
* lisp/simple.el:
* lisp/startup.el:
* lisp/subr.el:
* lisp/term/ns-win.el:
* lisp/textmodes/bibtex.el:
* lisp/textmodes/conf-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/refill.el:
* lisp/textmodes/sgml-mode.el:
* lisp/textmodes/tex-mode.el:
* lisp/tutorial.el:
* lisp/url/url-dav.el:
* lisp/url/url-gw.el:
* lisp/url/url-http.el:
* lisp/url/url-methods.el:
* lisp/url/url-privacy.el:
* lisp/vc/cvs-status.el:
* lisp/vc/diff-mode.el:
* lisp/vc/ediff-init.el:
* lisp/vc/ediff-ptch.el:
* lisp/vc/log-edit.el:
* lisp/vc/log-view.el:
* lisp/vc/pcvs-info.el:
* lisp/vc/pcvs.el:
* lisp/vc/smerge-mode.el:
* lisp/vc/vc-git.el:
* lisp/vc/vc-hg.el:
* lisp/vc/vc-mtn.el:
* lisp/vc/vc-rcs.el:
* lisp/whitespace.el:
* lisp/window.el:
* test/lisp/electric-tests.el:
* test/lisp/emacs-lisp/cl-lib-tests.el:
* test/lisp/emacs-lisp/ert-tests.el:
* test/lisp/epg-tests.el:
* test/lisp/jsonrpc-tests.el:
* test/src/data-tests.el:
* test/src/json-tests.el: Replace most insignificant backquotes.
2018-11-25 21:08:08 +01:00
Gemini Lasswell
5b50fa5a9d Always make buttons from function names in backtraces
* lisp/emacs-lisp/backtrace.el (backtrace-view)
(backtrace--print-func-and-args, backtrace-mode): Always
make buttons.  Remove all uses of ':do-xrefs'.
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Modify
backtrace-view instead of setting it.
* lisp/emacs-lisp/edebug.el (edebug-backtrace):
* lisp/emacs-lisp/ert.el
(ert-results-pop-to-backtrace-for-test-at-point):
Remove initialization of backtrace-view.
2018-08-03 08:53:02 -07:00
Gemini Lasswell
e09120d686 Add backtrace-mode and use it in the debugger, ERT and Edebug
* doc/lispref/debugging.texi (Using Debugger): Remove explanation of
backtrace buffer.  Refer to new node.
(Backtraces): New node.
(Debugger Commands): Refer to new node.  Remove 'v'.
* doc/lispref/edebug.texi (Edebug Misc): Refer to new node.
* doc/misc/ert.texi (Running Tests Interactively): Refer to new node.

* lisp/emacs-lisp-backtrace.el: New file.
* test/lisp/emacs-lisp/backtrace-tests.el: New file.

* lisp/emacs-lisp/debug.el: (debugger-buffer-state): New cl-defstruct.
(debugger--restore-buffer-state): New function.
(debug): Use a debugger-buffer-state object to save and restore buffer
state.  Fix bug#15749 by leaving an unused buffer in debugger-mode,
empty, instead of in fundamental-mode, and then when reusing a buffer,
not calling debugger-mode if the buffer is already in debugger-mode.
(debugger-insert-backtrace): Remove.
(debugger-setup-buffer): Use backtrace-mode.
(debugger--insert-header): New function.
(debugger-continue, debugger-return-value): Change check for flags to
use backtrace-frames.
(debugger-frame-number): Determine backtrace frame number from
backtrace-frames.
(debugger--locals-visible-p, debugger--insert-locals)
(debugger--show-locals, debugger--hide-locals)
(debugger-toggle-locals): Remove.
(debugger-mode-map): Make a child of backtrace-mode-map.  Move
navigation commands to backtrace-mode-map.  Bind 'q' to debugger-quit
instead of top-level.  Make Help Follow menu item call
backtrace-help-follow-symbol.
(debugger-mode): Derive from backtrace-mode.
(debug-help-follow): Remove.  Move body of this function to
'backtrace-help-follow-symbol' in backtrace.el.
(debugger-quit): New function.

* lisp/emacs-lisp/edebug.el (edebug-unwrap-results): Remove warning
in docstring about circular results.
(edebug-unwrap): Use pcase.
(edebug-unwrap1): New function to unwrap circular objects.
(edebug-unwrap*): Use it.
(edebug--frame): New cl-defstruct.
(edebug-backtrace): Call the buffer *Edebug Backtrace* and use
backtrace-mode.  Get the frames from edebug--backtrace-frames.
(edebug--backtrace-frames, edebug--unwrap-and-add-info)
(edebug--symbol-not-prefixed-p): New functions.

* lisp/emacs-lisp/lisp-mode.el
(lisp-el-font-lock-keywords-for-backtraces)
(lisp-el-font-lock-keywords-for-backtraces-1)
(lisp-el-font-lock-keywords-for-backtraces-2): New constants.

* lisp/emacs-lisp/ert.el (ert--print-backtrace): Remove.
(ert--run-test-debugger): Use backtrace-get-frames.
(ert-run-tests-batch): Use backtrace-to-string.
(ert-results-pop-to-backtrace-for-test-at-point): Use backtrace-mode.
(ert--insert-backtrace-header): New function.

* tests/lisp/emacs-lisp/ert-tests.el (ert-test--which-file):
Use backtrace-frame slot accessor.
2018-08-03 08:53:02 -07:00
Basil L. Contovounesios
2fde6275b6 Add predicate proper-list-p
For discussion, see emacs-devel thread starting at
https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00460.html.

* lisp/subr.el (proper-list-p): New function.
Implementation suggested by Paul Eggert <eggert@cs.ucla.edu> in
https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00138.html.
* doc/lispref/lists.texi (List Elements):
* etc/NEWS: Document proper-list-p.
* lisp/org/ob-core.el (org-babel-insert-result):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-if):
* lisp/emacs-lisp/cl-macs.el (cl--make-usage-args): Use proper-list-p.
* lisp/emacs-lisp/ert.el (ert--proper-list-p): Remove.
Replaced by proper-list-p in lisp/subr.el.
(ert--explain-equal-rec): Use proper-list-length.
* lisp/format.el (format-proper-list-p): Remove.
Replaced by proper-list-p in lisp/subr.el.
(format-annotate-single-property-change): Use proper-list-p.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-proper-list-p):
Move from here...
* test/lisp/subr-tests.el (subr-tests--proper-list-length):
...to here, mutatis mutandis.
2018-07-09 19:00:43 -07:00
Michael Albinus
1979bce57d Print top time consuming tests if advised
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
New argument HIGH.  Print top-running tests.

* test/Makefile.in (check-doit): Use ${SUMMARIZE_TESTS}.

* test/README: Explain SUMMARIZE_TESTS.
2018-03-19 12:58:45 +01:00
Michael Albinus
9942734c75 * lisp/emacs-lisp/ert.el (ert-run-tests-batch): Print selector. 2018-03-18 10:01:37 +01:00
Michael Albinus
bcec2a8a39 Print test timings unconditionally
* lisp/emacs-lisp/ert.el (ert-batch-print-duration): Remove.
(ert-run-tests-batch): Adapt accordingly.

* test/Makefile.in:
* test/README: Remove TEST_PRINT_TEST_DURATION.
2018-03-17 10:25:22 +01:00
Michael Albinus
2d0853f62a Optimize "make check" and "make check-maybe"
* lisp/emacs-lisp/ert.el (ert-run-tests-batch): Print summary duration.

* test/Makefile.in (TEST_LOAD_EL): Set default to "no" for
targets all, check, and check-maybe.  (Bug#30807)

* test/README: Reflect recent changes in Makefile.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test99-libarchive-tests): Tag it :unstable.
2018-03-16 16:19:10 +01:00
Glenn Morris
5d968dbf6b More hydra.nixos.org logging for unfinished tests
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Dump contents of any unfinished log files on hydra.nixos.org.
2018-03-14 14:30:39 -04:00
Michael Albinus
84a946a519 Extend ert to print duration of single tests
* lisp/emacs-lisp/ert.el (ert-test-result): New slot ´duration'.
(ert-run-or-rerun-test): Set it.
(ert-batch-print-duration): New defvar.
(ert-run-tests-batch): Print duration if needed.

* test/Makefile.in (TEST_PRINT_TEST_DURATION): New variable.

* test/README: Explain TEST_PRINT_TEST_DURATION.
2018-03-14 16:21:06 +01:00
Stefan Monnier
0a75af9156 * lisp/emacs-lisp/ert.el (describe-symbol-backends): Add ourselves
(ert-describe-test): Return the description text as well.
Remove left over version check.
* lisp/help-mode.el (describe-symbol-backends): Add docstring.
2018-01-22 22:00:55 -05:00
Paul Eggert
bb267f17f9 Merge from origin/emacs-26
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
2018-01-01 01:13:04 -08:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Pogonyshev
6da65bde8c Add 'ert-quiet' variable
* lisp/emacs-lisp/ert.el (ert-quiet): New variable.
(ert-run-tests-batch): When 'ert-quiet' is non-nil, don't
print non-important information.  (Bug#29025)

* doc/misc/ert.texi (Running Tests in Batch Mode): Document it.

* etc/NEWS: Mention the new variable.
2017-10-28 13:46:36 +03:00
Noam Postavsky
de60992053 Fix ert-test finding by symbol (Bug#28849)
In 2017-07-28 "* lisp/subr.el (define-symbol-prop): New function", the
symbol used for ert tests in load-history was changed from
`ert-deftest' to `ert--test', but a couple of other places were not
updated accordingly.
* lisp/emacs-lisp/ert.el (ert-find-test-other-window): Pass
`ert--test' as the TYPE to `find-function-do-it'.
(top-level): Use `ert--test' as the key to the
`find-function-regexp-alist' entry.
2017-10-15 13:58:45 -04:00
Noam Postavsky
af130f900f Fix ert backtrace saving for non-`signal'ed errors (Bug#28333)
* lisp/emacs-lisp/ert.el (ert--run-test-debugger): Take the frames
above the `debugger' frame, rather than assuming there will be a
`signal' frame.
2017-09-28 19:57:24 -04:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Mark Oteiza
35c893ddaf Move gensym to core Elisp
* doc/lispref/symbols.texi (Creating Symbols): Mention gensym right
after make-symbol.
* etc/NEWS: Mention.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Alias to
gensym-counter.
(cl-gensym): Alias to gensym.
* lisp/emacs-lisp/cl.el: Remove gensym from list of aliases.
* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper):
* lisp/emacs-lisp/ert-x.el (ert-with-message-capture):
(ert--expand-should-1, ert--expand-should):
(ert--should-error-handle-error):
* lisp/emacs-lisp/generator.el (cps--gensym):
* lisp/emacs-lisp/gv.el (setf):
* lisp/emacs-lisp/inline.el (inline--do-letlisteval):
* lisp/emacs-lisp/pcase.el (pcase--make-docstring, pcase-dolist):
(pcase--funcall, pcase--u1): Use gensym.
* lisp/subr.el (gensym-counter): New variable.
(gensym): New function, assimilated from cl-lib.
2017-09-12 11:08:00 -04:00
Glenn Morris
01a82957d2 ; * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin): Fix tag. 2017-09-05 20:53:57 -04:00
Glenn Morris
52c9c6b9d8 Allow customizing line length of ert backtraces in batch mode
* lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin):
Make it a user option.
(ert-run-tests-batch): Handle ert-batch-backtrace-right-margin nil.
2017-09-05 20:40:10 -04:00
Alexander Gramiak
054c198c12 Catch argument and macroexpansion errors in ert
This kludge catches errors caused by evaluating arguments in ert's
should, should-not, and should-error macros; it also catches
macroexpansion errors inside of the above macros (Bug#24402).

* lisp/emacs-lisp/ert.el: (ert--should-signal-hook): New function.
(ert--expand-should-1): Catch macroexpansion errors.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-should-error-argument)
(ert-test-should-error-macroexpansion): Tests for argument and
expansion errors.
2017-08-07 18:43:54 -04:00
Stefan Monnier
bfb8d33fd1 * lisp/subr.el (define-symbol-prop): New function
(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.
2017-07-28 12:02:01 -04:00
Glenn Morris
e19e1f9d4b Stop using unibyte buffers for ert backtraces
* lisp/emacs-lisp/ert.el
(ert-results-pop-to-backtrace-for-test-at-point):
Set multibyte true, not false.  This copies a
debugger-setup-buffer change from 2009-08-30, and stops the
"Backtrace for" header line containing ^X and ^Y.
2017-07-26 12:38:46 -04:00
Stefan Monnier
69fb12a66b (loadhist-unload-element): Move ERT and cl-generic methods
* lisp/loadhist.el (loadhist-unload-element): Don't define cl-generic
and ert methods here.
(loadhist-unload-element) <(head define-type)>: Remove unused var `slots'.

* lisp/emacs-lisp/cl-generic.el (loadhist-unload-element): Define
unload method for cl-defmethod.
(cl-generic-ensure-function): Remove redundant `defalias'.

* lisp/emacs-lisp/ert.el (ert-set-test): Move the current-load-list
setting here...
(ert-deftest): ...from here.
(loadhist-unload-element): Define unload method for ert-deftest.
2017-07-24 15:58:30 -04:00
Glenn Morris
5ab91020fb Use a more specific test for running on hydra.nixos.org
* 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.
2017-07-18 12:53:46 -04:00
Noam Postavsky
9a2a7bb6e6 Let test summary go through even if some logs were not generated
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Check
for existence of log files before reading.
2017-07-01 23:42:30 -04:00
Noam Postavsky
ead545824e Improve ert backtrace recording
Change ert to use the new `backtrace-frames' function instead of
collecting frames one by one with `backtrace-frame'.  Additionally,
collect frames starting from `signal' instead the somewhat arbitrary
"6 from the bottom".  Skipping 6 frames would skip the expression that
actually caused the signal that triggered the debugger.  Possibly 6
was chosen because in the case of a failed test, the triggering frame
is an `ert-fail' call, which is not so interesting.  But in case of a
test throwing an error, this drops the `error' call which is too much.

* lisp/emacs-lisp/debug.el (debugger-make-xrefs): Remove.
* lisp/emacs-lisp/ert.el (ert--make-xrefs-region): Bring in relevant
code from `debugger-make-xrefs'.
(ert--print-backtrace): Add DO-XREFS parameter, delegate to
`debugger-insert-backtrace'.
(ert--run-test-debugger): Record the backtrace frames starting from
the instigating `signal' call.
(ert-run-tests-batch): Pass nil for `ert--print-backtrace's new
DO-XREFS parameter.
(ert-results-pop-to-backtrace-for-test-at-point): Pass t as DO-XREFS
to `ert--print-backtrace' and remove call to `debugger-make-xrefs'.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Check
the backtrace list instead of comparing its string representation.
Expect `signal' to be the first frame.
2017-06-29 19:37:25 -04:00
Philipp Stephani
ebe0bdae9d Don't attempt to recover from undefined behavior in some cases
These functions can only be run in batch mode and exit Emacs on
return, so nothing can be recovered.  Disable unsafe recover
mechanisms so that we get real failures and good stack traces on
fatal signals.

* lisp/emacs-lisp/bytecomp.el (batch-byte-compile)
(batch-byte-recompile-directory):
* lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit)
(ert-summarize-tests-batch-and-exit): Don't attempt to recover
from undefined behavior.
2017-05-27 15:30:19 +02:00
Noam Postavsky
b20d05c6d7 Don't require bytecomp for running ert tests
"Fix ert-tests when running compiled" 2016-12-06 accidentally
introduced a dependency on `bytecomp' into `ert'.  As mentioned in
"Avoid ert test failures" 2017-04-18, the accidental dependency of ert
on bytecomp was masked by loading other libraries until recently.

* lisp/emacs-lisp/ert.el (ert--expand-should-1): Only use
`byte-compile-macro-environment' if it's bound.
* test/src/eval-tests.el: Add defvar for dynamic variable
`byte-compile-debug'.
2017-04-22 23:17:59 -04:00
Glenn Morris
491531b20d Avoid ert test failures
* lisp/emacs-lisp/ert.el (ert--expand-should-1):
Avoid errors related to undefined byte-compile-macro-environment.
Somehow masked until very recently because loading seq (eg)
loads bytecomp.  http://hydra.nixos.org/build/51730765
2017-04-18 12:52:33 -04:00
Glenn Morris
86e512ed10 Use user-error for some ert.el errors
* lisp/emacs-lisp/ert.el (ert-read-test-name, ert-delete-all-tests)
(ert-results-find-test-at-point-other-window, ert-describe-test):
Use user-error.
2017-04-13 21:17:09 -04:00
Noam Postavsky
7d27f5d8f4 * lisp/emacs-lisp/ert.el (ert-run-tests): Make INTERACTIVE arg optional. 2017-03-28 09:44:24 -04:00
Helmut Eller
ef44346782 Make it easier to abort a series of tests with C-g
* emacs-lisp/ert.el (ert-run-tests): Add "interactively" arg.  If
interactively is true and a test was aborted then ask if the remaining
tests should be aborted too.
(ert-run-tests-batch, ert-run-tests-interactively): Pass in
interactively arg.
2017-03-24 20:13:17 -04:00
Glenn Morris
dacafa8c30 Ert commands to error if no test at point (bug#25931)
* lisp/emacs-lisp/ert.el (ert-results-mode-menu):
Deactivate some items if no test at point.
(ert--results-test-at-point-no-redefinition):
Add option to signal an error rather than return nil.
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-results-describe-test-at-point): Error if no test at point.
2017-03-02 15:40:15 -05:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Noam Postavsky
58e418d2ce Fix ert-tests when running compiled
* test/lisp/emacs-lisp/ert-tests.el (ert-test-deftest): Don't test for
specific macroexpansion, just check result of evaluation.
(ert-test-record-backtrace): Don't hardcode representation of closure in
expected backtrace, this lets the test succeed even when the test code
is compiled.

* lisp/emacs-lisp/ert.el (ert--expand-should-1): Also pass
`byte-compile-macro-environment' to `macroexpand', this allows the
`should' macro to properly handle macroexpansion of macros that were
defined in the same file when it's being compiled (Bug #17851).
2016-12-06 22:20:23 -05:00
Glenn Morris
631ca55c6d ; * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Remove debug code accidentally left in previous.
2016-05-16 20:52:13 -04:00
Glenn Morris
d90c3a742f * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Include more details on hydra.
2016-05-16 20:49:39 -04:00
Paul Eggert
e2f785991d Simplify now that float-time etc. are built-in
This was prompted by warnings about calls to now-obsolete functions.
* lisp/calendar/time-date.el (encode-time-value):
Use setq rather than a recursive call, to avoid a warning
about calling this obsolete function.
* lisp/calendar/time-date.el (encode-time-value)
(with-decoded-time-value, time-to-seconds, time-to-number-of-days):
* lisp/erc/erc.el (erc-emacs-time-to-erc-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Simplify now that time-add and float-time are now built-in.
* lisp/calendar/time-date.el (time-add, time-subtract, time-less-p):
* lisp/net/newst-backend.el (time-add):
* lisp/org/org.el (time-subtract):
Remove backward-compatibility definitions; they are now built-in.
* lisp/calendar/timeclock.el (timeclock-time-to-seconds)
(timeclock-seconds-to-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Now obsolete, since callers can just use float-time and
seconds-to-time.  All uses changed.
* lisp/emacs-lisp/ert.el (ert-results-pop-to-timings):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/nndiary.el (nndiary-compute-reminders):
* lisp/net/tramp.el (tramp-time-diff):
* lisp/org/org-clock.el (org-clock-timestamps-change):
Prefer the time-subtract builtin to the subtract-time alias.
* lisp/files.el (dir-locals-find-file, dir-locals-read-from-dir):
* test/lisp/character-fold-tests.el (character-fold--speed-test):
Prefer the float-time builtin to the time-to-seconds alias.
* lisp/org/org-agenda.el, lisp/org/org-clock.el, lisp/org/org-list.el:
* lisp/org/org-timer.el, lisp/org/org.el:
Adjust to org-float-time deprecation.
2016-05-08 12:46:22 -07:00
Artur Malabarba
3ef1d9aea9 * lisp/emacs-lisp/ert.el (ert--results-move): Change error to user-error 2016-01-25 08:55:17 +00:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Anders Lindgren
0284660f27 ; Restore selector `member' accidentally drooped in ert rewrite.
; `test/automated/ert.el' and `test/automated/ert-x.el' now run
; without errors.

* lisp/emacs-lisp/ert.el (ert--insert-human-readable-selector): Add
the `member' selector. This was accidentally dropped when code was
converted from `cl-typecase' (where `member' has a special meaning)
and `cl-ecase' (where it doesn't) to `pcase'.
2015-12-11 06:46:19 +01:00
Paul Eggert
9b0ffdbadd Spelling fixes
* doc/misc/calc.texi (Predefined Units): Use the bland modern
scientific style for spelling the units “ampere” and
“angstrom” rather than the older style “Ampere” and
“Ångstrom”.  The latter spelling was wrong anyway (it should
have been “Ångström”).
* lisp/emacs-lisp/ert.el (ert--explain-equal-rec):
Fix misspelling of ‘atom’ in code.
2015-12-07 08:38:05 -08:00
Stefan Monnier
c2917b02bf * lisp/emacs-lisp/ert.el: Prefer pcase over cl-typecase
* lisp/emacs-lisp/ert.el (ert--should-error-handle-error)
(ert--explain-format-atom, ert--explain-equal-rec)
(ert--print-backtrace, ert-test-result-type-p, ert-select-tests)
(ert--insert-human-readable-selector): Prefer pcase over cl-typecase.
2015-12-04 12:59:21 -05:00
Paul Eggert
ac16149ba4 Fix docstring quoting problems with ‘ '’
Problem reported by Artur Malabarba in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html
Most of these fixes are to documentation; many involve fixing
longstanding quoting glitches that are independent of the
recent substitute-command-keys changes.  The changes to code are:
* lisp/cedet/mode-local.el (mode-local-augment-function-help)
(describe-mode-local-overload):
Substitute docstrings before displaying them.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
Quote the generated docstring for later substitution.
2015-11-17 15:29:35 -08:00
Phillip Lord
5c86118b4b * lisp/emacs-lisp/ert.el: Print results without newline escaping 2015-10-26 20:27:16 +00:00