Closed immerrr closed 9 years ago
Looks like ert-test-skipped-p
isn't available before Emacs 24.3. Can you do something like this (https://github.com/flycheck/flycheck/blob/master/flycheck-ert.el#L41-L62) to make sure it works in older Emacsen!?
Or just use a dummy predicate on 24.2 and earlier, since you can't get skipped tests on these anyway.
All green (I have added a simple fboundp
check).
Just to make sure I understand this change. Will ert-test-passed-p
/ert-test-failed-p
only return t
if :expected-result
is used? So this change should only effect tests using :expected-result
?
Will ert-test-passed-p/ert-test-failed-p only return t if :expected-result is used?
ert-test-passed-p
is a predicate for cl-defstruct
that is returned when a test passes, so it will return t
for passed tests regardless of :expected-result
(which is :passed
by default).
So this change should only effect tests using :expected-result?
The output should change only for those tests (and those that are skipped). Internally, most of the cases will use different codepaths. The default branch of cond
is left for backward compatibility with other test outcomes (:quit
and :aborted-with-non-local-exit
).
Actually, don't merge this just yet, I have found an interesting function ert-char-for-test-result
that can replace that function completely. I wonder if it is available in earlier versions...
Yep, it is!
It changed the characters for expected failures from xX
to fP
, though, but that's even better since it will be consistent with ert.
Merged, thanks!
This adds expected failures drawn as
x
and unexpected successes drawn asX
in dot reporter.