Glenn Morris
5a8816f3f2
Simplify and parallize test/automated Makefile
...
* Makefile.in (mostlyclean, clean): Maybe clean test/automated.
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): New.
* test/automated/Makefile.in: Simplify and parallelize.
(XARGS_LIMIT, BYTE_COMPILE_EXTRA_FLAGS)
(setwins, compile-targets, compile-main, compile-clean): Remove.
(GREP_OPTIONS): Unexport.
(.el.elc): Replace with pattern rule.
(%.elc, %.log): New pattern rules.
(ELFILES, LOGFILES): New variables.
(check): Depend on LOGFILES. Call ert-summarize-tests-batch-and-exit.
(clean, mostlyclean): New rules.
(bootstrap-clean): Simplify.
(bootstrap-clean, distclean): Depend on clean.
* .bzrignore: Ignore test/automated/*.log.
Fixes: debbugs:15991
2014-06-25 22:47:10 -07:00
Dmitry Antipov
9c3883b47d
* lisp/electric.el (electric-layout-post-self-insert-function):
...
* lisp/emacs-lisp/ert.el (ert--insert-infos):
* lisp/obsolete/vi.el (vi-set-mark):
* lisp/term.el (term-handle-scroll):
* lisp/textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry):
* lisp/gnus/gnus-sum.el (gnus-summary-edit-article-done):
* lisp/org/org-mouse.el (org-mouse-do-remotely):
* lisp/wid-edit.el (widget-editable-list-value-create): Prefer
point-marker to copy-marker of point.
* lisp/ob-core.el (org-babel-insert-result): Prefer point-min-marker
and point-max-marker.
2014-06-22 09:43:58 +04:00
Dmitry Gutov
40ff7f86b6
* lisp/emacs-lisp/ert.el (ert-run-tests-interactively): `read' the
...
result of `completing-read' in the interactive form.
Fixes: debbugs:16854
2014-02-26 04:02:21 +02:00
Anders Lindgren
08e4189736
* lisp/emacs-lisp/ert.el (ert--activate-font-lock-keywords): Allow dashes in
...
the names.
Fixes: debbugs:16620
2014-02-04 12:37:08 -05:00
Paul Eggert
ba3189039a
Update copyright year to 2014 by running admin/update-copyright.
2014-01-01 07:43:34 +00:00
Glenn Morris
049638ad60
* lisp/emacs-lisp/ert.el (ert-select-tests): Fix string/symbol mixup.
...
Fixes: debbugs:16121
2013-12-19 00:14:37 -08:00
Paul Eggert
a67c4ae059
Spelling fixes.
2013-11-04 23:44:14 -08:00
Michael Albinus
3dab0a832c
* emacs-lisp/ert.el (ert-run-tests-interactively):
...
Use `completing-read'. (Bug#9756)
2013-10-25 14:07:34 +02:00
Michael Albinus
50b5b85741
* emacs-lisp/ert.el (ert-deftest): Bind macro `skip-unless'.
...
(ert-test-skipped): New error.
(ert-skip, ert-stats-skipped): New defuns.
(ert--skip-unless): New macro.
(ert-test-skipped): New struct.
(ert--run-test-debugger, ert-test-result-type-p)
(ert-test-result-expected-p, ert--stats, ert-stats-completed)
(ert--stats-set-test-and-result, ert-char-for-test-result)
(ert-string-for-test-result, ert-run-tests-batch)
(ert--results-update-ewoc-hf, ert-run-tests-interactively): Handle
skipped tests.
2013-10-24 09:34:41 +02:00
Glenn Morris
90582f05bc
Add a major-mode for the *Messages* buffer
...
Ref: http://lists.gnu.org/archive/html/emacs-devel/2010-02/msg00135.html
* lisp/simple.el (messages-buffer-mode): New major mode.
(messages-buffer): New function.
* lisp/startup.el (normal-top-level): Switch mode of *Messages* buffer.
* src/xdisp.c (message_dolog): If we create *Messages*,
switch it to messages-buffer-mode.
* lisp/emacs-lisp/ert.el (ert--force-message-log-buffer-truncation)
(ert-run-test): Use `message-buffer' function.
(ert--force-message-log-buffer-truncation): Ignore read-only.
* lisp/help.el (view-echo-area-messages): Use `message-buffer' function.
* lisp/mail/emacsbug.el (report-emacs-bug): Use `message-buffer' function.
* lisp/gnus/gnus-util.el (gnus-message-with-timestamp-1):
Use `message-buffer' function if available. Ignore read-only.
* etc/NEWS: Mention this.
2013-09-17 00:39:54 -07:00
Stefan Monnier
54bd972f15
* lisp/subr.el (define-error): New function.
...
* doc/lispref/control.texi (Signaling Errors): Refer to define-error.
(Error Symbols): Add `define-error'.
* doc/lispref/errors.texi (Standard Errors): Don't refer to `error-conditions'.
* lisp/progmodes/ada-xref.el (ada-error-file-not-found): Rename from
error-file-not-found and define with define-error.
* lisp/emacs-lisp/cl-lib.el (cl-assertion-failed): Move here from subr.el
and define with define-error.
* lisp/userlock.el (file-locked, file-supersession):
* lisp/simple.el (mark-inactive):
* lisp/progmodes/js.el (js-moz-bad-rpc, js-js-error):
* lisp/progmodes/ada-mode.el (ada-mode-errors):
* lisp/play/life.el (life-extinct):
* lisp/nxml/xsd-regexp.el (xsdre-invalid-regexp, xsdre-parse-error):
* lisp/nxml/xmltok.el (xmltok-markup-declaration-parse-error):
* lisp/nxml/rng-util.el (rng-error):
* lisp/nxml/rng-uri.el (rng-uri-error):
* lisp/nxml/rng-match.el (rng-compile-error):
* lisp/nxml/rng-cmpct.el (rng-c-incorrect-schema):
* lisp/nxml/nxml-util.el (nxml-error, nxml-file-parse-error):
* lisp/nxml/nxml-rap.el (nxml-scan-error):
* lisp/nxml/nxml-outln.el (nxml-outline-error):
* lisp/net/soap-client.el (soap-error):
* lisp/net/gnutls.el (gnutls-error):
* lisp/net/ange-ftp.el (ftp-error):
* lisp/mpc.el (mpc-proc-error):
* lisp/json.el (json-error, json-readtable-error, json-unknown-keyword)
(json-number-format, json-string-escape, json-string-format)
(json-key-format, json-object-format):
* lisp/jka-compr.el (compression-error):
* lisp/international/quail.el (quail-error):
* lisp/international/kkc.el (kkc-error):
* lisp/emacs-lisp/ert.el (ert-test-failed):
* lisp/calc/calc.el (calc-error, inexact-result, math-overflow)
(math-underflow):
* lisp/bookmark.el (bookmark-error-no-filename):
* lisp/epg.el (epg-error): Define with define-error.
2013-08-09 17:22:44 -04:00
Glenn Morris
a19b3c2d97
Stop reimplementing a bunch of cl- functions in ert
...
* lisp/emacs-lisp/ert.el: Require cl-lib at runtime too.
(ert--cl-do-remf, ert--remprop, ert--remove-if-not)
(ert--intersection, ert--set-difference, ert--set-difference-eq)
(ert--union, ert--gensym-counter, ert--gensym-counter)
(ert--coerce-to-vector, ert--remove*, ert--string-position)
(ert--mismatch, ert--subseq): Remove reimplementations of cl funcs.
(ert-make-test-unbound, ert--expand-should-1)
(ert--expand-should, ert--should-error-handle-error)
(should-error, ert--explain-equal-rec)
(ert--plist-difference-explanation, ert-select-tests)
(ert--make-stats, ert--remove-from-list, ert--string-first-line):
Use cl-lib functions rather than reimplementations.
* test/automated/ert-tests.el: Require cl-lib at runtime too.
(ert-test-special-operator-p): Use cl-gensym rather than ert-- version.
(ert-test-remprop, ert-test-remove-if-not, ert-test-remove*)
(ert-test-set-functions, ert-test-gensym)
(ert-test-coerce-to-vector, ert-test-string-position)
(ert-test-mismatch): Remove tests.
* test/automated/cl-lib.el: New, split from ert-tests.el.
2013-07-11 09:13:38 -07:00
Stefan Monnier
285c8184af
* emacs-lisp/ert.el: Fix paren typo.
2013-04-07 16:42:11 -04:00
Nic Ferrier
e3e7b504b2
* lisp/emacs-lisp/ert.el (should, should-not, should-error): Add edebug
...
declaration.
2013-04-07 14:56:28 -04:00
Glenn Morris
84a06b500f
ert--explain-format-atom fix for non-characters
...
* lisp/emacs-lisp/ert.el (ert--explain-format-atom):
Don't try to print non-characters as characters.
Fixes: debbugs:13543
2013-02-03 23:46:22 -08:00
Dmitry Antipov
30818a239e
Use point-max-marker and point-min-marker here and there.
...
* lisp/emacs-lisp/ert.el (ert-run-test): Use point-max-marker.
* lisp/erc/erc-dcc.el (erc-dcc-chat-setup): Likewise.
* lisp/gnus/gnus-async.el (gnus-async-article-callback): Likewise.
* lisp/erc/erc-dcc.el (erc-dcc-send-file): Use point-min-marker.
* lisp/gnus/gnus-art.el (gnus-mime-display-security): Use point-min-marker
and point-max-marker.
2013-01-11 14:40:54 +04:00
Paul Eggert
0877d0dc24
Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68
Update copyright notices for 2013.
2013-01-01 09:11:05 +00:00
Stefan Monnier
15c9d04ea4
* emacs-lisp/ert.el, emacs-lisp/ert-x.el: Use cl-lib and lexical-binding.
2012-11-22 22:26:09 -05:00
Stefan Monnier
bc715d67b3
* lisp/emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.
2012-11-19 12:02:20 -05:00
Glenn Morris
74bfe42a98
Standardize some license notices
2012-09-24 08:58:20 -07:00
Chong Yidong
fb7ada5f94
Remove * characters from the front of variable docstrings.
2012-04-09 21:05:48 +08:00
Glenn Morris
44e97401cd
Standardize possessive apostrophe usage in manuals, docs, and comments
...
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00649.html
2012-02-28 00:17:21 -08:00
Glenn Morris
acaf905b11
Add 2012 to FSF copyright years for Emacs files
2012-01-05 01:46:05 -08:00
Juanma Barranquero
cd1181dbec
Fix typos.
2011-11-20 04:48:53 +01:00
Paul Eggert
8350f087ef
Spelling fixes.
2011-11-14 12:23:26 -08:00
Glenn Morris
c235b55508
* emacs-lisp/ert.el (ert--explain-equal-rec, ert-select-tests): Doc fixes.
2011-10-15 12:24:14 -07:00
Christian Ohler
7d476bdec5
* emacs-lisp/ert.el (ert-run-tests-batch): Remove unused variable.
...
(ert-delete-all-tests): Use `called-interactively-p' rather than
`interactive-p'.
(ert--make-xrefs-region): Respect END.
2011-03-20 21:17:10 +11:00
Christian Ohler
de69c0a8d1
Added fast path to ERT explanation of `equal'.
...
* emacs-lisp/ert.el (ert--explain-equal): New function.
(ert--explain-equal-rec): Renamed from `ert--explain-not-equal'.
All callers changed.
(ert--explain-equal-including-properties): Renamed from
`ert--explain-not-equal-including-properties'. All callers
changed.
* automated/ert-tests.el (ert-test-explain-not-equal-keymaps):
New test.
2011-03-03 02:01:51 -07:00
Christian Ohler
7c0d14414f
Fix ERT bug related to quit handling.
...
* emacs-lisp/ert.el (ert--stats-set-test-and-result)
(ert-char-for-test-result, ert-string-for-test-result)
(ert-run-tests-batch, ert--print-test-for-ewoc):
Handle `ert-test-quit'.
2011-03-03 01:16:58 -07:00
Christian Ohler
5da16a8641
Fix ERT.
...
* lisp/emacs-lisp/ert.el (ert--setup-results-buffer)
(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-pop-to-timings): Revert parts of 2011-02-02T17:59:44Z!sds@gnu.org that
were incorrect and unnecessary. This should make `make check'
pass again.
2011-02-18 15:20:36 +11:00
Sam Steingold
e90f854587
* lisp/apropos.el (apropos-print): Now that `apropos-mode' inherits
...
from `special-mode', entering it makes the buffer read-only, so
call it only when everything has been already inserted.
* lisp/emacs-lisp/ert.el (ert--setup-results-buffer)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-timings): Ditto.
* lisp/emacs-lisp/package.el (package--list-packages): Ditto.
* lisp/play/solitaire.el (solitaire): Ditto.
2011-02-02 12:59:44 -05:00
Sam Steingold
abef340a0c
* lisp/simple.el (special-mode-map): Bind "h" to `describe-mode';
...
bind "z" to `kill-this-buffer'.
(completion-list-mode-map): Bind "z" to `kill-this-buffer'.
* lisp/apropos.el (apropos-mode-map): Inherit from `special-mode-map'.
(apropos-mode): Inherit from `special-mode'.
* lisp/arc-mode.el (archive-mode-map): Inherit from `special-mode-map'.
* lisp/bookmark.el (bookmark-bmenu-mode): Define using
`define-derived-mode' inheriting from `special-mode'.
* lisp/dired.el (dired-mode-map): Inherit from `special-mode-map'.
* lisp/image-mode.el (image-mode-map): Ditto.
* lisp/replace.el (occur-mode): Define using
`define-derived-mode' inheriting from `special-mode'.
* lisp/tar-mode.el (tar-mode): Inherit from `special-mode'.
* lisp/calendar/diary-lib.el (diary-fancy-display-mode):
Inherit from `special-mode-map'.
* lisp/emacs-lisp/ert.el (ert-simple-view-mode, ert-results-mode):
Inherit from `special-mode'.
* lisp/emacs-lisp/package.el (package-menu-mode-map): Copy from
`special-mode-map'.
(package-menu-mode): Define using `define-derived-mode'
inheriting from `special-mode'.
* erc/erc-list.el (erc-list-menu-mode): Inherit from `special-mode'.
* lisp/net/xesam.el (xesam-mode): Inherit from `special-mode'.
(xesam-mode-map): Define separately.
* lisp/play/solitaire.el (solitaire-mode): Inherit from `special-mode'.
* lisp/progmodes/compile.el (compilation-minor-mode-map)
(compilation-mode-map): Inherit from `special-mode-map'.
* lisp/vc/diff-mode.el (diff-mode-shared-map):
Inherit from `special-mode-map'.
* lisp/vc/log-view.el (log-view-mode-map): Add a comment.
2011-02-01 16:22:21 -05:00
Glenn Morris
73b0cd5003
Convert consecutive FSF copyright years to ranges.
2011-01-24 20:08:28 -08:00
Christian Ohler
d221e7808c
Add ERT, a tool for automated testing in Emacs Lisp.
...
* Makefile.in, configure.in, doc/misc/Makefile.in, doc/misc/makefile.w32-in:
Add ERT. Make "make check" run tests in test/automated.
* doc/misc/ert.texi, lisp/emacs-lisp/ert.el, lisp/emacs-lisp/ert-x.el:
New files.
* test/automated: New directory.
2011-01-13 03:08:24 +11:00