emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/buttercup 4063f55 162/340: Add function buttercup--specs


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup 4063f55 162/340: Add function buttercup--specs
Date: Thu, 16 Dec 2021 14:59:26 -0500 (EST)

branch: elpa/buttercup
commit 4063f5592728ce77a29c10ad730f2fd2833acaff
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Jorgen Schäfer <Jorgen.Schaefer@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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]