branch: elpa/buttercup commit 8afc407d513f6b4adcf5e0212f555b89d71e4448 Author: Ola Nilsson <ola.nils...@gmail.com> Commit: Ola Nilsson <ola.nils...@gmail.com>
Switch from to pcase for spec-done in buttercup-reporter-batch-color Completely equivalent to the cond for used. --- buttercup.el | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/buttercup.el b/buttercup.el index d010614..eeaf5d3 100644 --- a/buttercup.el +++ b/buttercup.el @@ -1653,25 +1653,25 @@ EVENT and ARG are described in `buttercup-reporter'." (unless (string-match-p "[\n\v\f]" (buttercup-spec-description arg)) (buttercup-reporter-batch event arg))) (`spec-done - (cond - ((eq (buttercup-spec-status arg) 'passed) - (buttercup--print (buttercup-colorize "\r%s" 'green) - (buttercup--indented-description arg))) - ((eq (buttercup-spec-status arg) 'failed) - (buttercup--print (buttercup-colorize "\r%s FAILED" 'red) - (buttercup--indented-description arg)) - (setq buttercup-reporter-batch--failures - (append buttercup-reporter-batch--failures - (list arg)))) - ((eq (buttercup-spec-status arg) 'pending) - (if (equal (buttercup-spec-failure-description arg) "SKIPPED") - (buttercup--print " %s" (buttercup-spec-failure-description arg)) - (buttercup--print (buttercup-colorize "\r%s %s" 'yellow) - (buttercup--indented-description arg) - (buttercup-spec-failure-description arg)))) - (t - (error "Unknown spec status %s" (buttercup-spec-status arg)))) - (buttercup--print " (%s)\n" (buttercup-elapsed-time-string arg))) + (pcase (buttercup-spec-status arg) + (`passed + (buttercup--print (buttercup-colorize "\r%s" 'green) + (buttercup--indented-description arg))) + (`failed + (buttercup--print (buttercup-colorize "\r%s FAILED" 'red) + (buttercup--indented-description arg)) + (setq buttercup-reporter-batch--failures + (append buttercup-reporter-batch--failures + (list arg)))) + (`pending + (if (equal (buttercup-spec-failure-description arg) "SKIPPED") + (buttercup--print " %s" (buttercup-spec-failure-description arg)) + (buttercup--print (buttercup-colorize "\r%s %s" 'yellow) + (buttercup--indented-description arg) + (buttercup-spec-failure-description arg)))) + (_ + (error "Unknown spec status %s" (buttercup-spec-status arg)))) + (buttercup--print " (%s)\n" (buttercup-elapsed-time-string arg))) (`buttercup-done (dolist (failed buttercup-reporter-batch--failures)