summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/ert.el
Commit message (Collapse)AuthorAgeFilesLines
* Avoid some double-rounding of Lisp timestampsPaul Eggert2019-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, simplify some time-related Lisp timestamp code while we’re in the neighborhood. * lisp/battery.el (battery-linux-proc-acpi) (battery-linux-sysfs, battery-upower, battery-bsd-apm): * lisp/calendar/timeclock.el (timeclock-seconds-to-string) (timeclock-log, timeclock-last-period) (timeclock-entry-length, timeclock-entry-list-span) (timeclock-find-discrep, timeclock-generate-report): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/completion.el (cmpl-hours-since-origin): * lisp/ecomplete.el (ecomplete-decay-1): * lisp/emacs-lisp/ert.el (ert--results-update-stats-display) (ert--results-update-stats-display-maybe): * lisp/emacs-lisp/timer-list.el (list-timers): * lisp/emacs-lisp/timer.el (timer-until) (timer-event-handler): * lisp/erc/erc-backend.el (erc-server-send-ping) (erc-server-send-queue, erc-handle-parsed-server-response) (erc-handle-unknown-server-response): * lisp/erc/erc-track.el (erc-buffer-visible): * lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p) (erc-cmd-PING, erc-send-current-line): * lisp/eshell/em-pred.el (eshell-pred-file-time): * lisp/eshell/em-unix.el (eshell-show-elapsed-time): * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:org-timestamp): * lisp/gnus/gnus-int.el (gnus-backend-trace): * lisp/gnus/gnus-sum.el (gnus-user-date): * lisp/gnus/mail-source.el (mail-source-delete-crash-box): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/ibuf-ext.el (ibuffer-mark-old-buffers): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/mouse.el (mouse--down-1-maybe-follows-link) (mouse--click-1-maybe-follows-link): * lisp/mpc.el (mpc--faster-toggle): * lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE) (rcirc-sentinel): * lisp/net/tramp-cache.el (tramp-get-file-property): * lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): * lisp/org/org-clock.el (org-clock-resolve): (org-resolve-clocks, org-clock-in, org-clock-out, org-clock-sum): * lisp/org/org-timer.el (org-timer-start) (org-timer-pause-or-continue, org-timer-seconds): * lisp/org/org.el (org-evaluate-time-range): * lisp/org/ox-publish.el (org-publish-cache-ctime-of-src): * lisp/pixel-scroll.el (pixel-scroll-in-rush-p): * lisp/play/hanoi.el (hanoi-move-ring): * lisp/proced.el (proced-format-time): * lisp/progmodes/cpp.el (cpp-progress-message): * lisp/progmodes/flymake.el (flymake--handle-report): * lisp/progmodes/js.el (js--wait-for-matching-output): * lisp/subr.el (progress-reporter-do-update): * lisp/term/xterm.el (xterm--read-event-for-query): * lisp/time.el (display-time-update, emacs-uptime): * lisp/tooltip.el (tooltip-delay): * lisp/url/url-cookie.el (url-cookie-parse-file-netscape): * lisp/url/url-queue.el (url-queue-prune-old-entries): * lisp/url/url.el (url-retrieve-synchronously): * lisp/xt-mouse.el (xterm-mouse-event): Avoid double-rounding of time-related values. Simplify. * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): When hoping for the best (unlikely), use a better decoded time. (icalendar--convert-sexp-to-ical): Avoid unnecessary encode-time. * lisp/calendar/timeclock.el (timeclock-when-to-leave): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/desktop.el (desktop-create-buffer): * lisp/emacs-lisp/benchmark.el (benchmark-elapse): * lisp/gnus/gnus-art.el (article-lapsed-string): * lisp/gnus/gnus-group.el (gnus-group-timestamp-delta): * lisp/gnus/nnmail.el (nnmail-expired-article-p): * lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles): * lisp/nxml/rng-maint.el (rng-time-function): * lisp/org/org-clock.el (org-clock-get-clocked-time) (org-clock-resolve, org-resolve-clocks, org-resolve-clocks-if-idle): * lisp/org/org-habit.el (org-habit-insert-consistency-graphs): * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info) (vhdl-fix-case-region-1): Use time-since instead of open-coding most of it. * lisp/erc/erc-dcc.el (erc-dcc-get-sentinel): * lisp/erc/erc.el (erc-string-to-emacs-time, erc-time-gt): Now obsolete. All uses changed. (erc-time-diff): Accept all Lisp time values. All uses changed. * lisp/gnus/gnus-demon.el (gnus-demon-idle-since): * lisp/gnus/gnus-score.el (gnus-score-headers): * lisp/gnus/nneething.el (nneething-make-head): * lisp/gnus/nnheader.el (nnheader-message-maybe): * lisp/gnus/nnimap.el (nnimap-keepalive): * lisp/image.el (image-animate-timeout): * lisp/mail/feedmail.el (feedmail-rfc822-date): * lisp/net/imap.el (imap-wait-for-tag): * lisp/net/newst-backend.el (newsticker--image-get): * lisp/net/rcirc.el (rcirc-handler-317, rcirc-handler-333): * lisp/obsolete/xesam.el (xesam-refresh-entry): * lisp/org/org-agenda.el (org-agenda-show-clocking-issues) (org-agenda-check-clock-gap, org-agenda-to-appt): * lisp/org/org-capture.el (org-capture-set-target-location): * lisp/org/org-clock.el (org-clock-resolve-clock) (org-clocktable-steps): * lisp/org/org-colview.el (org-columns-edit-value) (org-columns, org-agenda-columns): * lisp/org/org-duration.el (org-duration-from-minutes): * lisp/org/org-element.el (org-element-cache-sync-duration) (org-element-cache-sync-break) (org-element--cache-interrupt-p, org-element--cache-sync): * lisp/org/org-habit.el (org-habit-get-faces) * lisp/org/org-indent.el (org-indent-add-properties): * lisp/org/org-table.el (org-table-sum): * lisp/org/org-timer.el (org-timer-show-remaining-time) (org-timer-set-timer): * lisp/org/org.el (org-babel-load-file, org-today) (org-auto-repeat-maybe, org-2ft, org-time-stamp) (org-read-date-analyze, org-time-stamp-to-now) (org-small-year-to-year, org-goto-calendar): * lisp/org/ox.el (org-export-insert-default-template): * lisp/ses.el (ses--time-check): * lisp/type-break.el (type-break-time-warning) (type-break-statistics, type-break-demo-boring): * lisp/url/url-cache.el (url-cache-expired) (url-cache-prune-cache): * lisp/vc/vc-git.el (vc-git-stash-snapshot): * lisp/erc/erc-match.el (erc-log-matches-come-back): Simplify.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Tiny ert-summarize-tests-batch-and-exit improvementGlenn Morris2018-12-171-1/+2
| | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Report the details of unexpected passes as well as failures.
* | Replace insignificant backquotesMichael Heerdegen2018-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Always make buttons from function names in backtracesGemini Lasswell2018-08-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Add backtrace-mode and use it in the debugger, ERT and EdebugGemini Lasswell2018-08-031-24/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Add predicate proper-list-pBasil L. Contovounesios2018-07-091-20/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Print top time consuming tests if advisedMichael Albinus2018-03-191-4/+21
| | | | | | | | | | | | | | | | | | * 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.
* | * lisp/emacs-lisp/ert.el (ert-run-tests-batch): Print selector.Michael Albinus2018-03-181-2/+3
| |
* | Print test timings unconditionallyMichael Albinus2018-03-171-18/+8
| | | | | | | | | | | | | | | | * 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.
* | Optimize "make check" and "make check-maybe"Michael Albinus2018-03-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | More hydra.nixos.org logging for unfinished testsGlenn Morris2018-03-141-1/+8
| | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Dump contents of any unfinished log files on hydra.nixos.org.
* | Extend ert to print duration of single testsMichael Albinus2018-03-141-2/+15
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | * lisp/emacs-lisp/ert.el (describe-symbol-backends): Add ourselvesStefan Monnier2018-01-221-4/+9
| | | | | | | | | | | | (ert-describe-test): Return the description text as well. Remove left over version check. * lisp/help-mode.el (describe-symbol-backends): Add docstring.
* | Merge from origin/emacs-26Paul Eggert2018-01-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | Add 'ert-quiet' variablePaul Pogonyshev2017-10-281-14/+19
|/ | | | | | | | | | * 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.
* Fix ert-test finding by symbol (Bug#28849)Noam Postavsky2017-10-151-2/+2
| | | | | | | | | | | 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.
* Fix ert backtrace saving for non-`signal'ed errors (Bug#28333)Noam Postavsky2017-09-281-3/+2
| | | | | | * 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.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-2/+2
| | | | | | | | | | | | | 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.
* Move gensym to core ElispMark Oteiza2017-09-121-9/+9
| | | | | | | | | | | | | | | | | | | | | * 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.
* ; * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin): Fix tag.Glenn Morris2017-09-051-1/+1
|
* Allow customizing line length of ert backtraces in batch modeGlenn Morris2017-09-051-12/+19
| | | | | | * 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.
* Catch argument and macroexpansion errors in ertAlexander Gramiak2017-08-071-9/+32
| | | | | | | | | | | | 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.
* * lisp/subr.el (define-symbol-prop): New functionStefan Monnier2017-07-281-9/+2
| | | | | | | | (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.
* Stop using unibyte buffers for ert backtracesGlenn Morris2017-07-261-2/+1
| | | | | | | | * 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.
* (loadhist-unload-element): Move ERT and cl-generic methodsStefan Monnier2017-07-241-6/+7
| | | | | | | | | | | | | | | * 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.
* Use a more specific test for running on hydra.nixos.orgGlenn Morris2017-07-181-1/+1
| | | | | | | | | | | * 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.
* Let test summary go through even if some logs were not generatedNoam Postavsky2017-07-011-1/+1
| | | | | * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Check for existence of log files before reading.
* Improve ert backtrace recordingNoam Postavsky2017-06-291-49/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't attempt to recover from undefined behavior in some casesPhilipp Stephani2017-05-271-0/+10
| | | | | | | | | | | | | 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.
* Don't require bytecomp for running ert testsNoam Postavsky2017-04-221-2/+2
| | | | | | | | | | | | "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'.
* Avoid ert test failuresGlenn Morris2017-04-181-0/+1
| | | | | | | * 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
* Use user-error for some ert.el errorsGlenn Morris2017-04-131-6/+6
| | | | | | * 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.
* * lisp/emacs-lisp/ert.el (ert-run-tests): Make INTERACTIVE arg optional.Noam Postavsky2017-03-281-1/+1
|
* Make it easier to abort a series of tests with C-gHelmut Eller2017-03-241-9/+13
| | | | | | | | * 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.
* Ert commands to error if no test at point (bug#25931)Glenn Morris2017-03-021-23/+34
| | | | | | | | | | | * 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.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.
* | Fix ert-tests when running compiledNoam Postavsky2016-12-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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).
* | ; * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):Glenn Morris2016-05-161-1/+1
| | | | | | | | Remove debug code accidentally left in previous.
* | * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):Glenn Morris2016-05-161-4/+25
| | | | | | | | Include more details on hydra.
* | Simplify now that float-time etc. are built-inPaul Eggert2016-05-081-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * lisp/emacs-lisp/ert.el (ert--results-move): Change error to user-errorArtur Malabarba2016-01-251-3/+3
|
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* ; Restore selector `member' accidentally drooped in ert rewrite.Anders Lindgren2015-12-111-1/+1
| | | | | | | | | | ; `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'.
* Spelling fixesPaul Eggert2015-12-071-1/+1
| | | | | | | | | | * 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.
* * lisp/emacs-lisp/ert.el: Prefer pcase over cl-typecaseStefan Monnier2015-12-041-170/+167
| | | | | | | * 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.
* Fix docstring quoting problems with ‘ '’Paul Eggert2015-11-171-1/+1
| | | | | | | | | | | | | 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.