[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 97d86cd 326/496: Tweak test runner
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 97d86cd 326/496: Tweak test runner |
Date: |
Sun, 29 Aug 2021 11:34:00 -0400 (EDT) |
branch: elpa/swift-mode
commit 97d86cd5f2aae4acba75b0b7f56dcb736a8c2d09
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>
Tweak test runner
---
test/swift-mode-test-indent.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/test/swift-mode-test-indent.el b/test/swift-mode-test-indent.el
index aee43d6..a3b21c1 100644
--- a/test/swift-mode-test-indent.el
+++ b/test/swift-mode-test-indent.el
@@ -41,14 +41,14 @@
"Initialize and switch to the error buffer.
Return the error-buffer"
- (switch-to-buffer (get-buffer-create "*swift-mode-test-indent*"))
+ (pop-to-buffer (get-buffer-create "*swift-mode-test-indent*"))
(fundamental-mode)
(setq buffer-read-only nil)
(erase-buffer)
(current-buffer))
(defun swift-mode:run-test:indent ()
- "Run indentation test for swift-mode."
+ "Run indentation test for `swift-mode'."
(interactive)
(let ((error-buffer
(if noninteractive nil (swift-mode:setup-error-buffer)))
@@ -57,18 +57,23 @@ Return the error-buffer"
(cons 'error 0)
(cons 'warning 0)
(cons 'info 0)
- (cons 'ok 0))))
+ (cons 'ok 0)))
+ (progress-reporter (unless noninteractive
+ (make-progress-reporter "Running tests..."))))
(setq default-directory
(concat (file-name-as-directory swift-mode:test:basedir)
"swift-files"))
(dolist (swift-file (file-expand-wildcards "*.swift"))
+ (redisplay)
(with-temp-buffer
(switch-to-buffer (current-buffer))
(insert-file-contents-literally swift-file)
(swift-mode)
(setq current-line 0)
(while (not (eobp))
+ (when (not noninteractive)
+ (progress-reporter-update progress-reporter))
(setq current-line (1+ current-line))
(cond
((looking-at ".*//.*swift-mode:test:keep-indent")
@@ -88,6 +93,9 @@ Return the error-buffer"
(setcdr count-assoc (1+ (cdr count-assoc))))))
(forward-line))))
+ (when (not noninteractive)
+ (progress-reporter-done progress-reporter))
+
(swift-mode:print-message
error-buffer
(concat
@@ -174,6 +182,7 @@ Otherwise, MESSAGE is appended to the ERROR-BUFFER."
(if noninteractive
(princ message)
(with-current-buffer error-buffer
+ (goto-char (point-max))
(insert-and-inherit message))))
(provide 'swift-mode-test-indent)
- [nongnu] elpa/swift-mode 7fc03bf 295/496: Merge pull request #119 from syohex/update-url, (continued)
- [nongnu] elpa/swift-mode 7fc03bf 295/496: Merge pull request #119 from syohex/update-url, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 73abb98 292/496: Use cl-lib function instead of cl.el one, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 787658f 305/496: Update CONTRIBUTING.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0e24233 307/496: Fix forward/backward-sexp inside comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 60dab9b 308/496: Update test to return informative exit status, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 01a1127 318/496: Fix indentation before "where", ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b135df3 316/496: Fix output messages of the test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7837c90 319/496: Fix indentation around "where" and "catch", ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 42a209c 322/496: Fix indentation of guard, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ab9f414 320/496: Fix indentation of close curly brace of switch, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 97d86cd 326/496: Tweak test runner,
ELPA Syncer <=
- [nongnu] elpa/swift-mode ea77cf9 328/496: Add comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 6cd2948 342/496: Bump version to 2.2.1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7e78225 336/496: Bump version to 2.2, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1868590 348/496: Add build/debug command, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a6d00b5 352/496: Simplify code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 75f5214 364/496: Cleanup code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7a9cf18 382/496: Fix beginning/end-of-sentence, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 19e6974 371/496: Abstract syntax-ppss, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 69efea4 386/496: Add `current-defun-name`, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7739e49 387/496: Bump version to 4.1.0, ELPA Syncer, 2021/08/29