diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-12-12 15:31:33 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-12-12 15:31:33 +0100 |
commit | 0474fda62d79cb7eb250f34f19773c87f283c665 (patch) | |
tree | df7418a6b22fbbfda725c56825ec0290f8e6be39 /test/lisp/emacs-lisp/ert-tests.el | |
parent | be907b0ba82c2a65e0468d50653cae8a7cf5f16b (diff) | |
parent | 4afef614cd6c93b4d4a57aa5bb211563649abc56 (diff) | |
download | emacs-0474fda62d79cb7eb250f34f19773c87f283c665.tar.gz emacs-0474fda62d79cb7eb250f34f19773c87f283c665.tar.bz2 emacs-0474fda62d79cb7eb250f34f19773c87f283c665.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'test/lisp/emacs-lisp/ert-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/ert-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/ert-tests.el b/test/lisp/emacs-lisp/ert-tests.el index 1f54c8d07e4..a0c56be0cb0 100644 --- a/test/lisp/emacs-lisp/ert-tests.el +++ b/test/lisp/emacs-lisp/ert-tests.el @@ -806,6 +806,16 @@ This macro is used to test if macroexpansion in `should' works." :expected-result :failed ;; FIXME! Bug#11218 (should-not (with-demoted-errors (error "Foo")))) +(ert-deftest ert-test-fail-inside-should () + "Check that `ert-fail' inside `should' works correctly." + (let ((result (ert-run-test + (make-ert-test + :name 'test-1 + :body (lambda () (should (integerp (ert-fail "Boo")))))))) + (should (ert-test-failed-p result)) + (should (equal (ert-test-failed-condition result) + '(ert-test-failed ("Boo")))))) + (provide 'ert-tests) |