Mercurial > hg > xemacs-beta
changeset 4323:94509abd0ef0
Commit a forgotten chunk of 4d0f773d5e21.
This is the change to the file tests/automated/test-harness.el. See the
tests/ChangeLog of that commit,
http://mid.gmane.org/E1J1MtP-0000bo-Vw@alioth.debian.org for the details.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 11 Dec 2007 21:41:54 +0100 |
parents | f70e56bb52a7 |
children | 5e526366d533 |
files | tests/automated/test-harness.el |
diffstat | 1 files changed, 26 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/automated/test-harness.el Mon Dec 10 01:13:36 2007 -0800 +++ b/tests/automated/test-harness.el Tue Dec 11 21:41:54 2007 +0100 @@ -203,7 +203,29 @@ `(let ((test-harness-failure-tag "KNOWN BUG") (test-harness-success-tag "PASS (FAILURE EXPECTED)")) ,@body)) - + + (defmacro Known-Bug-Expect-Error (expected-error &rest body) + (let ((quoted-body (if (= 1 (length body)) + `(quote ,(car body)) `(quote (progn ,@body))))) + `(let ((test-harness-failure-tag "KNOWN BUG") + (test-harness-success-tag "PASS (FAILURE EXPECTED)")) + (condition-case error-info + (progn + (setq trick-optimizer (progn ,@body)) + (Print-Pass + "%S executed successfully, but expected error %S" + ,quoted-body + ',expected-error) + (incf passes)) + (,expected-error + (Print-Failure "%S ==> error %S, as expected" + ,quoted-body ',expected-error) + (incf no-error-failures)) + (error + (Print-Failure "%S ==> expected error %S, got error %S instead" + ,quoted-body ',expected-error error-info) + (incf wrong-error-failures)))))) + (defmacro Implementation-Incomplete-Expect-Failure (&rest body) `(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE") (test-harness-success-tag "PASS (FAILURE EXPECTED)")) @@ -337,7 +359,9 @@ ;; #### Perhaps this should override `message' itself, too? (defmacro Silence-Message (&rest body) - `(flet ((append-message (&rest args) ())) ,@body)) + `(flet ((append-message (&rest args) ()) + (clear-message (&rest args) ())) + ,@body)) (defmacro Ignore-Ebola (&rest body) `(let ((debug-issue-ebola-notices -42)) ,@body))