summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2020-11-24 18:38:36 +0100
committerPhilipp Stephani <phst@google.com>2020-11-24 18:39:58 +0100
commit5804ac0b49a9b98daa7eea5fbb94942601cd088c (patch)
treefb125b89fe33d296dc3b226b659b4158822c8dd3
parentf004b66bdbf47f6887ed1ff9976fe5282dfb54fe (diff)
downloademacs-5804ac0b49a9b98daa7eea5fbb94942601cd088c.tar.gz
Add a (broken) unit test to exemplify Bug#11218.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-with-demoted-errors): New (broken) unit test.
-rw-r--r--test/lisp/emacs-lisp/ert-tests.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/ert-tests.el b/test/lisp/emacs-lisp/ert-tests.el
index 96189356c02..1f54c8d07e4 100644
--- a/test/lisp/emacs-lisp/ert-tests.el
+++ b/test/lisp/emacs-lisp/ert-tests.el
@@ -801,6 +801,11 @@ This macro is used to test if macroexpansion in `should' works."
(should (eql 0 (ert-stats-completed-unexpected stats)))
(should (eql 1 (ert-stats-skipped stats)))))
+(ert-deftest ert-test-with-demoted-errors ()
+ "Check that ERT correctly handles `with-demoted-errors'."
+ :expected-result :failed ;; FIXME! Bug#11218
+ (should-not (with-demoted-errors (error "Foo"))))
+
(provide 'ert-tests)