[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit 86f1f5f3dd 3/7: Stop each test on first failure or
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit 86f1f5f3dd 3/7: Stop each test on first failure or unexpected success. |
Date: |
Sat, 9 Jul 2022 04:59:07 -0400 (EDT) |
branch: elpa/paredit
commit 86f1f5f3dd3358e1bb557a02465017e48b9e23a1
Author: Taylor R Campbell <campbell+paredit@mumble.net>
Commit: Taylor R Campbell <campbell+paredit@mumble.net>
Stop each test on first failure or unexpected success.
---
test.el | 56 ++++++++++++++++++++++++++++++--------------------------
1 file changed, 30 insertions(+), 26 deletions(-)
diff --git a/test.el b/test.el
index 539f8b2a22..07389a6595 100644
--- a/test.el
+++ b/test.el
@@ -43,33 +43,37 @@ Four arguments: the paredit command, the text of the buffer
(and (eq (car example) 'xfail)
(progn (setq example (cdr example)) t)))
(before (car example)))
- (dolist (expected (cdr example))
- (with-temp-buffer
- (paredit-test-buffer-setup)
- (insert before)
- (goto-char (point-min))
- (if (search-forward "_" nil t)
- (progn (delete-char -1) (set-mark (point))))
- (goto-char (point-min))
- (search-forward "|")
- (delete-char -1)
- (if (cond ((eq expected 'error)
- ;++ Check that there are no more expected states.
- (condition-case condition
- (progn (call-interactively command) t)
- (error nil)))
- ((stringp expected)
- (call-interactively command)
- (insert ?\|)
- (not (string= expected (buffer-string))))
- (t (error "Bad test expectation: %S" expected)))
- (if (not xfail)
+ (catch 'break
+ (dolist (expected (cdr example))
+ (with-temp-buffer
+ (paredit-test-buffer-setup)
+ (insert before)
+ (goto-char (point-min))
+ (if (search-forward "_" nil t)
+ (progn (delete-char -1) (set-mark (point))))
+ (goto-char (point-min))
+ (search-forward "|")
+ (delete-char -1)
+ (if (cond ((eq expected 'error)
+ ;++ Check that there are no more expected states.
+ (condition-case condition
+ (progn (call-interactively command) t)
+ (error nil)))
+ ((stringp expected)
+ (call-interactively command)
+ (insert ?\|)
+ (not (string= expected (buffer-string))))
+ (t (error "Bad test expectation: %S" expected)))
+ (progn
+ (if (not xfail)
+ (let ((actual (buffer-string)))
+ (paredit-test-failed command before actual expected)))
+ (throw 'break nil))
+ (if xfail
(let ((actual (buffer-string)))
- (paredit-test-failed command before actual expected)))
- (if xfail
- (let ((actual (buffer-string)))
- (paredit-test-failed command before actual 'failure)))))
- (setq before expected)))))
+ (paredit-test-failed command before actual 'failure)
+ (throw 'break nil)))))
+ (setq before expected))))))
(defun paredit-test-buffer-setup ()
(scheme-mode)
- [nongnu] elpa/paredit updated (8330a41e81 -> d0b1a2f42f), ELPA Syncer, 2022/07/09
- [nongnu] elpa/paredit 86f1f5f3dd 3/7: Stop each test on first failure or unexpected success.,
ELPA Syncer <=
- [nongnu] elpa/paredit 2ecb5f0dcf 4/7: Test some backward-slurp screw cases., ELPA Syncer, 2022/07/09
- [nongnu] elpa/paredit d0b1a2f42f 7/7: Bump copyright year., ELPA Syncer, 2022/07/09
- [nongnu] elpa/paredit 84e8ccd2ae 2/7: Add some examples of slurping edge cases that we should handle., ELPA Syncer, 2022/07/09
- [nongnu] elpa/paredit 568d4d48ef 5/7: More slurpage edge cases., ELPA Syncer, 2022/07/09
- [nongnu] elpa/paredit 4a1450bcc3 6/7: Respect fill-paragraph-function. Fall back to lisp-fill-paragraph., ELPA Syncer, 2022/07/09
- [nongnu] elpa/paredit c6300b9cbe 1/7: Batch up test failures and implement expected-failure., ELPA Syncer, 2022/07/09