[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c7987a6 07/26: Emacs exits abnormally when noninteractive
From: |
Rocky Bernstein |
Subject: |
[elpa] master c7987a6 07/26: Emacs exits abnormally when noninteractive test fails. |
Date: |
Thu, 25 May 2017 02:22:13 -0400 (EDT) |
branch: master
commit c7987a6e0d523b22712a937ab381d482dfe8fe9b
Author: rubikitch <address@hidden>
Commit: rubikitch <address@hidden>
Emacs exits abnormally when noninteractive test fails.
---
test-simple.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test-simple.el b/test-simple.el
index b9b4ffb..05a4e90 100644
--- a/test-simple.el
+++ b/test-simple.el
@@ -365,5 +365,15 @@ It is preferable to write at the first line of test files
as a comment, e.g,
(global-set-key (kbd test-simple-runner-key) func)
(funcall func)))
+(defun test-simple-noninteractive-kill-emacs-hook ()
+ "Emacs exits abnormally when noninteractive test fails."
+ (when (and noninteractive test-simple-info
+ (<= 1 (test-info-failure-count test-simple-info)))
+ (let (kill-emacs-hook)
+ (kill-emacs 1))))
+(when noninteractive
+ (add-hook 'kill-emacs-hook 'test-simple-noninteractive-kill-emacs-hook))
+
+
(provide 'test-simple)
;;; test-simple.el ends here
- [elpa] master updated (96cf00c -> a2383c7), Rocky Bernstein, 2017/05/25
- [elpa] master 9b35c3a 01/26: Use %S to print expected/actual message., Rocky Bernstein, 2017/05/25
- [elpa] master 2cbec07 02/26: Merge pull request #6 from rubikitch/better-failure-message, Rocky Bernstein, 2017/05/25
- [elpa] master 9a0f304 06/26: New function `test-simple-run': register test, Rocky Bernstein, 2017/05/25
- [elpa] master fc5c159 11/26: test-simple-run: make it a command., Rocky Bernstein, 2017/05/25
- [elpa] master 01f08e3 05/26: Document targets "check-short" and "install-short", Rocky Bernstein, 2017/05/25
- [elpa] master 46890e0 03/26: Rename test-gcd.el -> gcd-tests.el to comply with Melpa, Rocky Bernstein, 2017/05/25
- [elpa] master d857417 04/26: Merge pull request #8 from rubikitch/rename-test-filename, Rocky Bernstein, 2017/05/25
- [elpa] master 536ce2f 14/26: Remove unused lexical variables noted in byte compilation, Rocky Bernstein, 2017/05/25
- [elpa] master c7987a6 07/26: Emacs exits abnormally when noninteractive test fails.,
Rocky Bernstein <=
- [elpa] master d9abe19 08/26: gcd-tests.el: Add test-simple-run comment line, Rocky Bernstein, 2017/05/25
- [elpa] master a8bd341 22/26: Merge pull request #11 from doomvox/tap_stdout, Rocky Bernstein, 2017/05/25
- [elpa] master 6fd325b 17/26: Merge pull request #10 from syohex/switch-to-cask, Rocky Bernstein, 2017/05/25
- [elpa] master 611bd94 16/26: Switch from Carton to Cask, Rocky Bernstein, 2017/05/25
- [elpa] master e199434 20/26: Minor changes, Rocky Bernstein, 2017/05/25
- [elpa] master 8204b89 10/26: .travis.yml: Drop support of Emacs23 (Test in Emacs24), Rocky Bernstein, 2017/05/25
- [elpa] master 35ef95d 09/26: Mention test-simple-run in README.md, Rocky Bernstein, 2017/05/25
- [elpa] master 613fe8b 19/26: Version 1.2.0 sync with elpa, Rocky Bernstein, 2017/05/25
- [elpa] master 604942d 24/26: Merge pull request #12 from syohex/cl-lib, Rocky Bernstein, 2017/05/25
- [elpa] master a2383c7 26/26: Bump version .., Rocky Bernstein, 2017/05/25