Mercurial > hg > xemacs-beta
diff tests/automated/test-harness.el @ 3472:43b4a54fbf66
[xemacs-hg @ 2006-06-24 14:30:36 by stephent]
Silence commands that set marks etc in test suite.
<87wtb67hm2.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Sat, 24 Jun 2006 14:30:39 +0000 |
parents | 3b1f8220a65e |
children | 3660d327399f |
line wrap: on
line diff
--- a/tests/automated/test-harness.el Sat Jun 24 13:50:23 2006 +0000 +++ b/tests/automated/test-harness.el Sat Jun 24 14:30:39 2006 +0000 @@ -38,6 +38,14 @@ ;;; Implementation-Incomplete-Expect-Failure wrapper macros to mark them. ;;; A lot of the tests we run push limits; suppress Ebola message with the ;;; Ignore-Ebola wrapper macro. +;;; Some noisy code will call `message'. Output from `message' can be +;;; suppressed with the Silence-Message macro. Functions that are known to +;;; issue messages include `write-region', `find-tag', `tag-loop-continue', +;;; `insert', and `mark-whole-buffer'. N.B. The Silence-Message macro +;;; currently does not suppress the newlines printed by `message'. +;;; Definitely do not use Silence-Message with Check-Message. +;;; In general it should probably only be used on code that prepares for a +;;; test, not on tests. ;;; ;;; You run the tests using M-x test-emacs-test-file, ;;; or $(EMACS) -batch -l .../test-harness.el -f batch-test-emacs file ... @@ -291,7 +299,7 @@ ,quoted-body ',expected-error error-info) (incf wrong-error-failures))))) - + ;; Do not use this with Silence-Message. (defmacro Check-Message (expected-message-regexp &rest body) (Skip-Test-Unless (fboundp 'defadvice) "can't defadvice" @@ -323,6 +331,10 @@ (incf other-failures))) (ad-unadvise 'message))))) + ;; #### Perhaps this should override `message' itself, too? + (defmacro Silence-Message (&rest body) + `(flet ((append-message (&rest args) ())) ,@body)) + (defmacro Ignore-Ebola (&rest body) `(let ((debug-issue-ebola-notices -42)) ,@body))