[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 444716b 079/340: Handle windows better in intera
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 444716b 079/340: Handle windows better in interactive runs. |
Date: |
Thu, 16 Dec 2021 14:59:08 -0500 (EST) |
branch: elpa/buttercup
commit 444716bad7454351663cc7ddeb5094332cfc620a
Author: Jorgen Schaefer <contact@jorgenschaefer.de>
Commit: Jorgen Schaefer <contact@jorgenschaefer.de>
Handle windows better in interactive runs.
When running tests interactively, Buttercup now does not change the
input focus to the *Buttercup* buffer when there was an error. Also,
Buttercup now scrolls the test results to the end, as most of
the interesting this are shown at the end.
Fixes #14
---
buttercup.el | 11 ++++++++---
tests/test-buttercup.el | 6 +++---
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index f9f0a44..fc990a4 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -620,8 +620,9 @@ KEYWORD can have one of the following values:
(interactive)
(let ((buttercup-suites nil)
(lexical-binding t))
- (eval-defun nil)
- (buttercup-run)
+ (save-selected-window
+ (eval-defun nil)
+ (buttercup-run))
(message "Suite executed successfully")))
;;;###autoload
@@ -865,7 +866,11 @@ Calls either `buttercup-reporter-batch' or
(insert (apply 'format fmt args))))))
(unwind-protect
(buttercup-reporter-batch event arg)
- (fset 'buttercup--print old-print)))))
+ (fset 'buttercup--print old-print)))
+ (let ((w (get-buffer-window (current-buffer))))
+ (when w
+ (with-selected-window w
+ (goto-char (point-max)))))))
;;;;;;;;;;;;;
;;; Utilities
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 5df1952..7d90b08 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -103,10 +103,10 @@
:to-throw
'buttercup-failed "Explanation")))
-(describe "The `buttercup-define-matcher' macro"
- (buttercup-define-matcher :test-matcher (a b)
- (+ a b))
+(buttercup-define-matcher :test-matcher (a b)
+ (+ a b))
+(describe "The `buttercup-define-matcher' macro"
(it "should create a matcher usable by apply-matcher"
(expect (buttercup--apply-matcher :test-matcher '(1 2))
:to-equal
- [nongnu] elpa/buttercup afbaae1 091/340: Document file names for test discovery, (continued)
- [nongnu] elpa/buttercup afbaae1 091/340: Document file names for test discovery, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 25cb350 089/340: Rename docs to be more easily understandable, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6d96ea3 093/340: Add format specifier to error call with argument, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup cef9988 110/340: Merge pull request #61 from spwhitton/fix-regexp, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2b5f53d 121/340: [Fix #72] Add buttercup-minor-mode, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 5db07c9 112/340: Merge pull request #63 from ebpa/patch-1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a05fdcb 117/340: Colorize output, ELPA Syncer, 2021/12/16
- [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 <=
- [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, 2021/12/16
- [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