[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 62c416a 164/340: Rewrite the pattern loop of but
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 62c416a 164/340: Rewrite the pattern loop of buttercup-run-discover |
Date: |
Thu, 16 Dec 2021 14:59:26 -0500 (EST) |
branch: elpa/buttercup
commit 62c416a534a1b0c2acf1cababc49c435d4e33ea7
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Jorgen Schäfer <Jorgen.Schaefer@gmail.com>
Rewrite the pattern loop of buttercup-run-discover
Use the buttercup--specs function to replace much of the outer loop.
---
buttercup.el | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index d72b245..4171ebb 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1244,21 +1244,13 @@ current directory."
(when (not (string-match "\\(^\\|/\\)\\." (file-relative-name file)))
(load file nil t))))
(when patterns
- (let ((suites-or-specs buttercup-suites))
- (while suites-or-specs
- (cond
- ((buttercup-suite-p (car suites-or-specs))
- (setq suites-or-specs (append suites-or-specs
- (buttercup-suite-children
- (car suites-or-specs)))))
- ((buttercup-spec-p (car suites-or-specs))
- (catch 'return
- (dolist (p patterns)
- (when (string-match p (buttercup-spec-full-name (car
suites-or-specs)))
- (throw 'return t)))
- (setf (buttercup-spec-function (car suites-or-specs))
- (lambda () (signal 'buttercup-pending "SKIPPED"))))))
- (setq suites-or-specs (cdr suites-or-specs)))))
+ (dolist (spec (buttercup--specs buttercup-suites))
+ (let ((spec-full-name (buttercup-spec-full-name spec)))
+ (unless (cl-dolist (p patterns)
+ (when (string-match p spec-full-name)
+ (cl-return t)))
+ (setf (buttercup-spec-function spec)
+ (lambda () (signal 'buttercup-pending "SKIPPED")))))))
(buttercup-run)))
;;;###autoload
- [nongnu] elpa/buttercup a970d10 228/340: Implement spy-calls-count-returned and spy-calls-count-errors, (continued)
- [nongnu] elpa/buttercup a970d10 228/340: Implement spy-calls-count-returned and spy-calls-count-errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8d91893 232/340: Optimize spy-calls-count-errors and spy-calls-count-returned, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 83141f7 243/340: Raise an error if spy-on is used in the wrong context, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 16e3530 090/340: Also update Makefile to the new docs names, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 794afbf 114/340: Merge pull request #65 from DamienCassou/patch-1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d5c9a19 120/340: Make --with-cleanup public so spies can be used without specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 79286cf 055/340: Test for the batch reporter., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 87e0c0d 073/340: Bump version: 1.0 → 1.1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 10e0537 150/340: Manually fix bumpversion.cfg, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 18a8879 151/340: Bump version: 1.8 → 1.9, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 62c416a 164/340: Rewrite the pattern loop of buttercup-run-discover,
ELPA Syncer <=
- [nongnu] elpa/buttercup 636db47 172/340: Typo fixes (#126), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8034597 175/340: Replace remaining calls to obsolete buttercup-*-parents, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f57036f 180/340: Update the disabled/pending sections of writing-tests.md, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 406c41d 190/340: Print elapsed time for each spec, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 19f256e 094/340: Update copyright / license information for some details, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 46882f8 131/340: Show a message about duplicate spec names, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 07cf64b 140/340: Run test-buttercup.el before tests in writing-tests.md, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2edeae5 159/340: Rewrite buttercup-suite-full-name with a single loop, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4063f55 162/340: Add function buttercup--specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bf0e1da 049/340: Rename tar target to release and add compile and clean targets., ELPA Syncer, 2021/12/16