[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/with-simulated-input a86f35f3b0 100/134: Add tests for un-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/with-simulated-input a86f35f3b0 100/134: Add tests for un-quoted lists |
Date: |
Mon, 10 Jan 2022 23:00:09 -0500 (EST) |
branch: elpa/with-simulated-input
commit a86f35f3b0bec0d511c14e4db3e8fd09d074872c
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>
Add tests for un-quoted lists
Un-quoted lists are likely to become the primary supported way of
passing multiple items as KEYS in the next major version.
---
tests/test-with-simulated-input.el | 46 ++++++++++++++++++++++++++++++++------
1 file changed, 39 insertions(+), 7 deletions(-)
diff --git a/tests/test-with-simulated-input.el
b/tests/test-with-simulated-input.el
index a349e47045..82994a2710 100644
--- a/tests/test-with-simulated-input.el
+++ b/tests/test-with-simulated-input.el
@@ -60,6 +60,32 @@
(read-string "Enter a string: "))
:to-equal "hello world"))
+ (it "is an un-quoted list of literal strings"
+ (expect
+ (with-simulated-input ("hello" "RET")
+ (read-string "Enter a string: "))
+ :to-equal "hello"))
+
+ (it "is an un-quoted list of lisp forms"
+ (expect
+ (with-simulated-input ((insert "hello") (exit-minibuffer))
+ (read-string "Enter a string: "))
+ :to-equal "hello"))
+
+ (it "is an un-quoted list of strings and lisp forms"
+ (expect
+ (with-simulated-input ((insert "hello") "RET")
+ (read-string "Enter a string: "))
+ :to-equal "hello")
+ (expect
+ (with-simulated-input ("hello" (exit-minibuffer))
+ (read-string "Enter a string: "))
+ :to-equal "hello")
+ (expect
+ (with-simulated-input ("hello SPC" (insert "world") "RET")
+ (read-string "Enter a string: "))
+ :to-equal "hello world"))
+
(it "is a variable containing any of the above"
(cl-loop
for input in
@@ -88,14 +114,8 @@
(with-simulated-input (concat "hello" " " "RET")
(read-string "Enter a string: "))
:to-equal "hello")
- (let ((my-key-sequence "hello")
+ (let ((my-key-sequence (kbd "hello"))
(my-lisp-form '(insert " world")))
- (expect
- (with-simulated-input '((execute-kbd-macro my-key-sequence)
- (eval my-lisp-form)
- "RET")
- (read-string "Enter a string: "))
- :to-equal "hello world")
(expect
(with-simulated-input (list
my-key-sequence
@@ -103,12 +123,24 @@
"RET")
(read-string "Enter a string: "))
:to-equal "hello world")
+ (expect
+ (with-simulated-input '((execute-kbd-macro my-key-sequence)
+ (eval my-lisp-form)
+ "RET")
+ (read-string "Enter a string: "))
+ :to-equal "hello world")
(expect
(with-simulated-input (list
`(execute-kbd-macro ,my-key-sequence)
`(eval ,my-lisp-form)
"RET")
(read-string "Enter a string: "))
+ :to-equal "hello world")
+ (expect
+ (with-simulated-input `((execute-kbd-macro ,my-key-sequence)
+ (eval ,my-lisp-form)
+ "RET")
+ (read-string "Enter a string: "))
:to-equal "hello world")))
;; This syntax is not known to be used in any real code
- [nongnu] elpa/with-simulated-input 0aeff5f17f 079/134: `with-simulated-input': remove legacy syntax, (continued)
- [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, 2022/01/10
- [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 <=
- [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
- [nongnu] elpa/with-simulated-input 00ed837502 012/134: Standardize on internal Emacs time type, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input f0dbf2fdd9 017/134: Fix a typo, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 69d91e4b51 025/134: Add a failing test for lexical variable access, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 9efeb236c8 028/134: Version 2.2, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input b0faef361b 027/134: Properly generate lexical closures for lisp actions in KEYS, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 5a0d3f0399 030/134: Version 2.3, ELPA Syncer, 2022/01/10