[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 562cdb0 058/340: The buttercup-suite-full-name f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 562cdb0 058/340: The buttercup-suite-full-name function. |
Date: |
Thu, 16 Dec 2021 14:59:04 -0500 (EST) |
branch: elpa/buttercup
commit 562cdb0393185e122bff673ff2259fa638c818b2
Author: Jorgen Schaefer <contact@jorgenschaefer.de>
Commit: Jorgen Schaefer <contact@jorgenschaefer.de>
The buttercup-suite-full-name function.
---
buttercup-test.el | 17 +++++++++++++++++
buttercup.el | 8 ++++++++
2 files changed, 25 insertions(+)
diff --git a/buttercup-test.el b/buttercup-test.el
index d27bdf2..06f7a56 100644
--- a/buttercup-test.el
+++ b/buttercup-test.el
@@ -208,6 +208,23 @@
:to-equal
2))))
+(describe "The `buttercup-suite-full-name' function"
+ (let (su1 su2)
+ (before-each
+ (setq su1 (make-buttercup-suite :description "su1")
+ su2 (make-buttercup-suite :description "su2"))
+ (buttercup-suite-add-child su1 su2))
+
+ (it "should return the full name of a suite without parents"
+ (expect (buttercup-suite-full-name su1)
+ :to-equal
+ "su1"))
+
+ (it "should return the full name of a suite with parents"
+ (expect (buttercup-suite-full-name su2)
+ :to-equal
+ "su1 su2"))))
+
;;;;;;;;;;;;;;;;;;;;
;;; Suites: describe
diff --git a/buttercup.el b/buttercup.el
index a81ea6d..7b42d71 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -270,6 +270,14 @@ MATCHER is either a matcher defined with
(apply #'+ (mapcar #'buttercup--total-specs-defined
(buttercup-suite-children suite-or-spec)))))
+(defun buttercup-suite-full-name (suite)
+ "Return the full name of SUITE, which includes the names of the parents."
+ (let ((name-parts (mapcar #'buttercup-suite-description
+ (cons suite (buttercup-suite-parents suite)))))
+ (mapconcat #'identity
+ (reverse name-parts)
+ " ")))
+
;;;;;;;;;;;;;;;;;;;;
;;; Suites: describe
- [nongnu] elpa/buttercup ed649d7 125/340: Merge pull request #76 from DamienCassou/make-buttercup--with-cleanup-public, (continued)
- [nongnu] elpa/buttercup ed649d7 125/340: Merge pull request #76 from DamienCassou/make-buttercup--with-cleanup-public, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ce75b50 115/340: Report load errors in buttercup-run-discover, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 3deb9a4 053/340: Test discovery: Ignore files in dot directories., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 444716b 079/340: Handle windows better in interactive runs., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 512b82b 077/340: Rework documentation to make the readme more concise., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 238bfa8 082/340: Support --pattern command line argument, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 5cbd468 084/340: Bump version: 1.2 → 1.3, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ba8cd05 106/340: Merge pull request #59 from immerrr/add-other-emacs-params, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 07c525e 116/340: Merge pull request #68 from ebpa/report-load-errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 11f072f 123/340: Merge pull request #81 from DamienCassou/fix-to-have-same-items-as, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 562cdb0 058/340: The buttercup-suite-full-name function.,
ELPA Syncer <=
- [nongnu] elpa/buttercup d264da3 075/340: Merge pull request #17 from Fuco1/master, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8c486e6 067/340: Move print settings to the batch reporter where they belong., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0f3eb63 078/340: Show actual function arguments when a spy fails., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 357e73b 085/340: Remove debug message, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 68692d9 113/340: Update Travis configuration instructions, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 54696b0 124/340: Merge pull request #78 from Fuco1/feature/buttercup-minor-mode, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 77f0c74 122/340: Fix :to-have-same-items-as (fix #80), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 20ec520 145/340: Rename functions and arguments for closure manipulation, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 5d1f338 146/340: Move let-binding outside loop for efficiency, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 7fa79c4 048/340: Expand and improve the package commentary., ELPA Syncer, 2021/12/16