branch: elpa/buttercup commit 4063f5592728ce77a29c10ad730f2fd2833acaff Author: Ola Nilsson <ola.nils...@gmail.com> Commit: Jorgen Schäfer <jorgen.schae...@gmail.com>
Add function buttercup--specs --- buttercup.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/buttercup.el b/buttercup.el index 87b2e5f..54d54ba 100644 --- a/buttercup.el +++ b/buttercup.el @@ -727,6 +727,15 @@ See also `buttercup-define-matcher'." "Return the number of failed specs in all suites in SUITE-LIST." (buttercup-suites-total-specs-status suite-list 'failed)) +(defun buttercup--specs (spec-or-suite-list) + "Return a flat list of all specs in SPEC-OR-SUITE-LIST." + (let (specs) + (dolist (spec-or-suite spec-or-suite-list specs) + (if (buttercup-spec-p spec-or-suite) + (setq specs (append specs (list spec-or-suite))) + (setq specs (append specs (buttercup--specs + (buttercup-suite-children spec-or-suite)))))))) + (defun buttercup--specs-and-suites (spec-or-suite-list) "Return a flat list of all specs and suites in SPEC-OR-SUITE-LIST." (let ((specs-and-suites nil))