[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/with-simulated-input d3696fb04c 098/134: Check errors more
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/with-simulated-input d3696fb04c 098/134: Check errors more strictly in tests |
Date: |
Mon, 10 Jan 2022 23:00:09 -0500 (EST) |
branch: elpa/with-simulated-input
commit d3696fb04cb822b677aa43de2ace5096bbbc6f16
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>
Check errors more strictly in tests
---
tests/test-with-simulated-input.el | 13 ++++++-------
with-simulated-input.el | 2 +-
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/tests/test-with-simulated-input.el
b/tests/test-with-simulated-input.el
index fc999af8e7..da4955d12b 100644
--- a/tests/test-with-simulated-input.el
+++ b/tests/test-with-simulated-input.el
@@ -136,14 +136,14 @@
(expect
(with-simulated-input '("hello" (error "Throwing an error from KEYS")
"RET")
(read-string "Enter a string: "))
- :to-throw))
+ :to-throw 'error '("Throwing an error from KEYS")))
(it "caused indirectly by the inputs in KEYS"
(expect
(with-simulated-input
"(error SPC \"Manually SPC throwing SPC an SPC error\") RET"
(command-execute 'eval-expression))
- :to-throw))
+ :to-throw 'error '("Manually throwing an error")))
(it "thrown by BODY"
(expect
@@ -151,13 +151,13 @@
"hello RET"
(read-string "Enter a string: ")
(error "Throwing an error after reading input"))
- :to-throw)
+ :to-throw 'error '("Throwing an error after reading input"))
(expect
(with-simulated-input
"hello RET"
(error "Throwing an error before reading input")
(read-string "Enter a string: "))
- :to-throw))
+ :to-throw 'error '("Throwing an error before reading input")))
(it "from aborting via C-g in KEYS"
(expect
@@ -182,7 +182,7 @@
(expect
(with-simulated-input "hello" ; No RET
(read-string "Enter a string: "))
- :to-throw))
+ :to-throw 'error '("Reached end of simulated input while evaluating
body")))
(it "should throw an error if the input is empty and BODY reads input"
(expect
@@ -275,10 +275,9 @@
;; Suppress messages by replacing `message' with a stub
(spy-on 'message)
(expect
-
(with-simulated-input "bl TAB C-j"
(completing-read "Choose: " my-collection nil t))
- :to-throw)))
+ :to-throw 'error '("Reached end of simulated input while evaluating
body"))))
(describe "should not reproduce past issues:"
;; https://github.com/DarwinAwardWinner/with-simulated-input/issues/4
diff --git a/with-simulated-input.el b/with-simulated-input.el
index 772656dd67..1595ec42c9 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -116,7 +116,7 @@ the body form as a function."
(throw result-sym (funcall main))))
(cl-remove-if-not #'functionp keys)
(list (lambda ()
- (error "Reached end of simulated input while
simulating body")))))
+ (error "Reached end of simulated input while
evaluating body")))))
(overriding-terminal-local-map
(if overriding-terminal-local-map
(copy-keymap overriding-terminal-local-map)
- [nongnu] elpa/with-simulated-input 311c142650 059/134: Add comments explaining why tests are run twice, (continued)
- [nongnu] elpa/with-simulated-input 311c142650 059/134: Add comments explaining why tests are run twice, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 09d6f80ddc 065/134: Add an `edebug' spec, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 14f3d86cb3 071/134: Fix tests, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 02b5d2c77f 072/134: Fix checkdoc warnings, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 4e45836cc0 078/134: Autoload `with-simulated-input--1', ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 89e63ebf6a 073/134: Fix tests for older Emacsen, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 0aeff5f17f 079/134: `with-simulated-input': remove legacy syntax, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 6f7787df80 082/134: Add an unload function, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 26fc928f42 092/134: Work around an incompatibility in Emacs 24 in tests, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input ef9d5164ca 094/134: Fix interpolation test, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input d3696fb04c 098/134: Check errors more strictly in tests,
ELPA Syncer <=
- [nongnu] elpa/with-simulated-input 703fc3c9ec 118/134: Update the docstring for "with-simulated-input", ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 73fa2256df 123/134: Move helper function next to macro, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 708051c57f 105/134: Improve error messages for invalid/incomplete KEYS, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input e7cc96e7df 102/134: Update the debug declaration for "with-simulated-input" macro, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 2f54a2550b 117/134: Clean up code for "with-simulated-input" macro, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input a86f35f3b0 100/134: Add tests for un-quoted lists, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 07bdfbe9ab 124/134: Increment version to 3.0, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 670c23e615 004/134: Update minimum Emacs version to 24.4, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input c97f27da20 005/134: Autoload the macro, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 369ca97402 006/134: Fix issues found by package-lint, ELPA Syncer, 2022/01/10